简体   繁体   中英

Strange behaviours receiving notifications from firebase on iOS

I have a project with two iOS apps configured on iOS. First I created one app on firebase console, downloaded the configuration file (Google-services.plist) , subscribed to a topic, and tried sending notifications from firebase console with success. Then, in the same XCode project, I changed the bundle identifier and the google-services.plist info with the info from another app. I deleted the app from the phone, made a clean and a build on the XCode project and tried to send notifications. I have no success, so I started making experiments.

After a while, I realized that I can send notifications to the device and to the topic so I tried sending notifications from the old app and then I realized that, strangely, I can receive notifications from the old app instead of the configurated app. It has no sense since the new app has a different bundle and a different google-services.plist pointing to the new bundle. Which could be my mistake?

Finally I found how to solve this. It seemed like Firebase notification server was the cause, so I deleted the two projects, created again and upload the .p12s again. Now all is working properly. I wrote these lines to help people with the same problem since I didn´t found anything similar on internet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM