iOS Build Environment Help Center

Include Notification Service Extension In IPA

append delete twk

Windows version: Windows 10
Builder version: 3.64
iOS SDK version: 17.2

I have created a Notification Service Extension Target in Xcode, connected it to my main project, and it's working well during development. However, I'm unsure how to properly include this target in the IPA when building the main project. What steps do I need to follow to ensure that the extension target is added to the IPA, so it functions correctly after deployment, just like it does in Xcode?

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello twk,

I'd use a pre-packaging script for that. Assuming your Notification Service Extension doesn't frequently change, you should be able to bundle it in binary form, by copying the files at the right place before the app bundle is signed.

append delete #2. twk

Hello Pierre-Marie Baty,

Thank you for the suggestion. While the source code of the Notification Service Extension target will remain unchanged, the target's bundle identifier may need to be updated frequently. For instance, similar to how we might create an 'Assets.xcassets' file, modify its contents, and then generate an 'Assets.car' file using 'cartool.exe', I’m interested in whether it’s possible to adjust specific target-related files and then use a tool or script to generate the 'NSExtension.appex' accordingly. Alternatively, if there’s a method to package the target in a manner similar to IPA packaging, that would be helpful as well.

It seems feasible, but I’m unsure of the exact approach. Any advice or insights would be greatly appreciated.

Thank you again for your assistance.

append delete #3. Pierre-Marie Baty

It definitely is. You'll need to reproduce the steps yourself using the toolchain tools to e.g. update entries in the Info.plist using plconvert, then zip the bundle again. I don't remember exactly how I bundle the .appex - I think it's done as a subdir of the master IPA but maybe I'm wrong, it's been a long time I haven't looked a that. Anyway, looking at the master build script should tell you how things are done.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty