[Firebase Cloud Message Plugin] Multiple PLIST files per app. How to handle?

Forge Component
(6)
Published on 18 Jul by Experts
6 votes
Published on 18 Jul by Experts

I'm developing an mobile app that needs push notifications. For this I have created one Firebase project and within that project I have create 3 apps per OS (3 for Android and 3 for iOS). 

The 3 apps all have 3 unique bundle-id's. I did this because 

1) I want to be able to test the messaging of Dev and Test without impacting Prod.
2) I was instructed this was the way to do this.

When enabling this component in my app I have no issue with Android. Simply drop the google-services.json in the resources folder according to the instructions here. This works perfectly because the json contains information about all 3 android apps I have defined in the Firebase Console.

But for the PLIST files it works differently. These files only contain information about their respective app. So the DEV PLIST files only contains information about the DEV environment etc. 


So my question is;

How should I handle PLIST files in my deployment environment? We have 3 environments; Dev. Test and Prod. I can think of 2 solutions;

1) Change the PLIST files in the respective environment after pushing it from one to the next (Dev to Test and Test to Dev). This is very error prone (what if this step is forgotten?) and I think this will cause issues when publishing via Lifetime as well.

2) Only use one iOS app defined in the Firebase console. (and while I'm at it, do the same thing for Android)

What is the best approach? I have no problem with changing the way I currently use Firebase since that could be totally wrong. 

So I'm really get stuck here. For my development test I need to build the app with the PLIST file that is mapped with the profile that is mapped my development certificate. And for deployment to either the enterprise store or the public store I need to use a PLIST file that is mapped to another profile. 

I can't seem to find a good way to handle this other then a lot of manual handling that is really fault sensitive. 

Has anyone else solved this? Am I missing or overlooking something? 


edit: I also wonder why I need to add the PLIST files at all. I already add those (and the correct ones) during configuration of the generation of the mobile apps in OutSystems. So perhaps this is the glaring oversight I'm having?  I have no experience at all with compiling Cordova apps so it could be total inexperience on my part.