Question, if I am writing async code in the notification service extension, I understand it terminates after 30 seconds. Correct, though I always recommend that anyone setting up things like timeouts use a shorter value just in case. So I'd probably build around ~25s, not 30s. If I want to wait until these async methods finish before calling the content handler, I believe an option I have is to use dispatch groups. However, I am open to other solutions if there are better options. What are you actually waiting on? In general, I've become very nervous anytime I see code that uses dispatch groups because they seem to be used as a slightly awkward band-aid trying to make something work that doesn't really want to work. Case in point here, the main reason an NSE would be waiting is network activity, in which case the simpler solution would be to simply set the right timeout on that network activity. Having said that.... My question is, if I use dispatch groups, is there any issue in using the main queue here? Or
Topic:
App & System Services
SubTopic:
Notifications
Tags: