Multitarget iOS app - possible in managed EAS Build?


I’ve been trying to install OneSignal in a managed app through config plugins. I am struggling how to create the required Notification Service Extension target programmatically through a config plugin?

I’ve tried to just create it through the XCode GUI and then copy in the directory through a config plugin. This didn’t work as XCode didn’t detect this folder…

I understand that once you’ve done it, there’s great thread on certificates here:

Would appreciate any help?

I don’t think there’s a config plugin for this, yet. You’d have to ask the OneSignal team to put something like this together, or build out the plugin yourself. Sidenote- I think the NSE only extends functionality, it’s not a hard requirement, but I could be wrong.

Thank you for the quick response, I’m happy to build out the config-plugin and I’m actually partly done with it.

My challenge comes in how to actually code the NSE through a config plugin? I can get all the files there, but somehow I need to register that this additional target exists so that XCode now’s to include it in the build…

I tried to use XcodeProjectFile “createBuildSourceFile” from @expo/config-plugins to register the NSE files (e.g. the Info.plist and Onesignal.m / .h files for the target), and the files correctly show up in XCode after a Expo prebuild, but they are just regular files and not registered under a NSE target…

Would be super helpful if you have any advice or ideas how one could register an additional target with a config-plugin?

Have you tried starting from a project with no NSE with a clean git branch, then adding the NSE through the Xcode UI, and then checking the git diff to see how exactly Xcode keeps track of the additional target? Then from there, look at the config plugin source to see if anything would write to that- expo-cli/packages/config-plugins/src/ios at master · expo/expo-cli · GitHub

You’re breaking new ground with this plugin, so it may require some deep digging :grinning_face_with_smiling_eyes: