The widely used plugin `phonegap-plugin-push` includes the Firebase iOS SDK for push messaging with iOS through FCM. But if you want to use a debug build which using the development certificates it currently thows the following error:
This error is thrown by Firebase here.
This is because this file is removed by the file `copy-www-build-step.js`on line 56. If we comment out this line, al works like a charm and we can use the debug release to test push messages through FCM.
If we take a look at Firebase iOS SDK it states `If the app does not contain the embedded.mobileprovision which is stripped out by Apple when the app is submitted to store, then it is highly likely that it is from Apple Store.`.
Which means that if `cordova-ios` removes this file as it does Firebase expects it to be a release build, which is incorrect and the error is thrown and you will not receive a correct FCM token for debug purposes.
So for the moment we created a hook that comments out the removal of `embedded.mobileprovision` after platform add. Now all works like a charm. But the main question is, should it be removed? Or how can we make sure Firebase iOS SDK will not mark it as production without that file?