How are you scheduling the
NSNetService
delegate callback? I suspect what’s happening here is that the service is scheduled on a run loop that’s not run very often, and hence the huge delay.
The other possibility is that your app extension is being suspended; you can rule out that possibility by using
-[NSProcessInfo performExpiringActivityWithReason:usingBlock:]
to temporarily prevent suspension.
Oh, and finally, why are you resolving this service? I generally try to avoid doing that, but instead use a connect-to-service API where possible.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"