Reputation: 41
I developing iOS app (swift 4) that support push notifications. I followed instructions from Google for installing pods (latest versions) also did everything as they said in app delegate class. App was working fine, I was receiving messages from Firebase. But after few day app crashed, with this error:
Terminating app due to uncaught exception 'com.firebase.instanceid', reason: 'Could not configure Firebase InstanceID. GCM_SENDER_ID must not be nil or empty.
First thing that I did, was to delete current GoogleService-Info.plist. Than I downloaded it again form Firebase, and problem was solved. Until crashed again with same error after few days, I repeat process and everything was fine again. So far this problem happened to me 5-6 time. Is there any permanent solutions? Thanks and sorry for bad english :)
Upvotes: 1
Views: 1368
Reputation: 41
I solved problem. If anyone have similar issue this is how:
Reason was that my app firstly only have firebase analytics. So I have downloaded GoogleService-Info.plist in whom there was property IS_GCM_ENABLED and it was set to NO. Later when I added push notifications and downloaded new GoogleService-Info.plist I did not delete old one (.plist of analytics). And now when I deleted old one (.plist of analytics), there where no more crashing. I suppose even setting IS_GCM_ENABLED on YES would solve the problem.
Upvotes: 0