cordova-ios
cordova-ios copied to clipboard
Automate "Notification Service Extension" (File > New > Target) step
Hi β ,
I'm working with a Cordova based App, and I would like to automate the "Notification Service Extension" step (In Xcode: File > New > Target) (for example, in Jenkins pipeline) , since I saw that after doing it, remove platform, and add it again, the associated target is removed π
I've been searching through the docs, stack overflow and another issues and I haven't seen anything... is this possible (config.xml, custom hook, post build script) ?
Thanks a lot in advance!
it's a pain that in every build you have to do all the steps, because it is lost when platform is removed
it should be possible to do it with hooks and xcodebuild... but I haven't found info about how to do it either
Yeah, a hook is probably the best option here.
Yeah, a hook is probably the best option here.
Thanks for the reply!
Do you have any idea about this? π
I've been searching and I couldn't find anything... π’
Can you diff the project before and after? Maybe the changes are simple enough so that you can just apply them via git? If not, maybe https://github.com/apache/cordova-node-xcode can help to manipulate the Xcode project via JS.
Can you diff the project before and after? Maybe the changes are simple enough so that you can just apply them via git? If not, maybe https://github.com/apache/cordova-node-xcode can help to manipulate the Xcode project via JS.
Yeah, I checked that and as long as I know, these are the changes (with a quick diff command):
-
<App>xcodeproj/project.pbxproj
modified -
<App>.xcworkspace/xcuserdata/<User>.xcuserdatad/UserInterfaceState.xcuserstate
modified -
CordovaLib/CordovaLib.xcodeproj/xcuserdata/<User>.xcuserdatad/xcschemes/xcschememanagement.plist
-
OneSignalNotificationServiceExtension
dir completely new
Use a hook for copy the OneSignalNotificationServiceExtension
dir should be easy, but after check the changes in another files, I think that they are non-trivial and a little bit dangerous for do it in a ci
environment ... β οΈ because that would require a lot of additions and deletions maybe π± ...
I'm going to read docs of cordova-node-xcode
, thanks for the help ... meanwhile any idea π‘
or a working example would be great π
Thanks for the helpβοΈ
Attaching an additional reference, there is an open ticket to support iOS "App Extension" target in Cordova's Jira system: https://issues.apache.org/jira/browse/CB-10218
i use trick in this one
https://github.com/crapthings/cordova-plugin-ios-shareextension
hooks code from cordova-openwith
https://github.com/nexushubs/cube/tree/cordova-openwith
Yeah hooks are the way to go to copy extension code from a plugin and the Xcode settings. I did this with "openwith" and call directory extensions https://github.com/GEDYSIntraWare/cordova-plugin-call-directory
So does anyone have a working hook they could share to automate this step for the purpose of being able to send images inside of remote push notifications on IOS please?
@vesper8 , did you find a way to do that? send images inside of remote push notifications on IOS?
Hi @rricamar have you found the fix for this, after 2 years of your post, I am struggling with same issue now, if you have any solution on it, can you please help us with your inputs. Thank You in advance.
Hi @rricamar have you found the fix for this, after 2 years of your post, I am struggling with same issue now, if you have any solution on it, can you please help us with your inputs. Thank You in advance.
Hello @srinivasaraosaluru, sadly I wasn't able to automate these steps since my low knowledge of the Xcode/iOS ecosystem. I had to replicate manually the steps before sending the app to the Apple Store revision until the project was over... π
I quickly checked One Signal's newest documentation and the process looks almost the same as back then, really sad to see that after 4 years after this hasn't been automated somehow π
Good luck π
Thank Ypou @rricamar for your comments, I have achieved the same with help of manual steps. Thank You once again.