I was able to successfully archive my main app that has a NotificationServiceExtension
.
However, once I installed the app via Testflight, I was able to receive a notification, but the push notification modifications I did were not applied.
When I just ran it via Xcode, the push notification modifications worked.
Do I need to archive the NotificationServiceExtension
instead of my main app?
If the app is built correctly, including the NSE in the build, archiving the main app should also properly archive the extension. So, what you would want to check first would be that your build settings are such that, the release builds are also including the NSE in the built app. You can check the app's Build Settings and Build Phases, and also the build logs to make sure that something is not failing while compiling and embedding the extension.
That said, failing to modify the notification does not automatically mean that the extension has not been archived. There could be a number of reasons, like:
- the notification payload for the production build is missing the
mutable-content
entry - the NSE is crashing at launch, or failing while processing the notification
- the code path in the NSE is failing to call the completion handler
- the NSE is taking more than the allowed memory or time limits (24MB and 30 seconds, as of this writing) and eventually being terminated before it can finish
So, if you are certain the build is correctly including the extension, you may want to check if it might be failing due to these or some other reason.
Argun Tekant / DTS Engineer / Core Technologies