Open MeijerJ-Qlip opened 4 years ago
We've had this issue for a while on our end, mainly happens when testing directly on a phone or by launching the first time on two simulators at the same time
@MeijerJ-Qlip I have the same case.
Basically I have no idea how should I properly run two environments. Should I download .plist file copy it and rename to .dev and .prod ? Or should I have three .plist files (+one withoult postfix) ? If I have two I see error that .plist file was not found otherwise I have similar case as You, it seems that it works but in fact it just uses this deleted .plist file.
@dtomaszewski I have decided not to use the built-in environments for my iOS builds. I already had a seperate shell script to build production and test releases. I included the copying of the right .plist
into App_Resources
The setup is as follows:
Add GoogleService-Info.plist.dev
and GoogleService-Info.plist.prod
to the main app folder. Add the dev file to App_Resources with the name GoogleService-Info.plist
.
This is the part of my script that adds the dev plist:
printf "${COLOR}Switching to dev GoogleService.plist...${NOCOLOR}\n"
cp GoogleService-Info.plist.test App_Resources/iOS
rm App_Resources/iOS/GoogleService-Info.plist
mv App_Resources/iOS/GoogleService-Info.plist.dev App_Resources/iOS/GoogleService-Info.plist
This is the other script that adds the prod plist:
printf "${COLOR}Switching to prod GoogleService.plist...${NOCOLOR}\n"
cp GoogleService-Info.plist.prod App_Resources/iOS
rm App_Resources/iOS/GoogleService-Info.plist
mv App_Resources/iOS/GoogleService-Info.plist.prod App_Resources/iOS/GoogleService-Info.plist
I do use the plugin's system for android builds. Please keep in mind that you will have to reset the plist to the dev version after running a prod build, but I simply do this by discarding all my git changes.
I am using the following versions:
I am using seperated environments as described here. I have both
GoogleService-Info.plist.dev
andGoogleService-Info.plist.prod
files in theApp_Resources
folder.I run
tns debug ios --env.dev --no-hmr
Chokidar seems to notice the dev file being copied and renamed and then being deleted again. This triggers a rebuild. This is then missing theGoogleService-Info.plist
file which has been deleted earlier. It would be very strange if this was actually the case, because I definitely wouldn't be the only one having issues like this.Relevant part of log: