52
Views
22
Comments
Solved
ios app can not recieve push notification using firebase throughout testflight
Question

I install the ios app throught testflight but I dont recieve a notification but in android device I can see push noti

I uploaded APNs key into firebase

In setting iphone, I only see notification for test flight, not for my app

Did I miss some config?

UserImage.jpg
Ricardo Silva
Solution

Hey there!

Official documentation states that anything installed via TestFlight needs to be sent through the production URL. With this, I believe that you would need to upload not the APNs key but the Product APNs certificate.

BR.

UserImage.jpg
Hanh Pham Mai My

I already upload Product APNs certificate into app, firebase and it still does not recieve push notification

UserImage.jpg
Ricardo Silva

Can you perform any other operation, like Subscribing to a topic or Registering your device?

UserImage.jpg
Hanh Pham Mai My

Yes, after login to the app I call register and gettoken then storage in database, when perform action push, I query token then send push. In android device, I still recieve push from ios app and adroid send but in ios app not

UserImage.jpg
Ricardo Silva

Does the issue only happen with TestFlight? Have you tried with an app generated with the `Development` type?

UserImage.jpg
Hanh Pham Mai My

Yes. Happen on test flight. I dont see setting push notification of app on Iphone device. I generated app with app store type. Is it correct?

UserImage.jpg
Ricardo Silva

Yes. But have you tried with a `development` type? To understand where the problem might live on. 

UserImage.jpg
Hanh Pham Mai My

I am not sure for previous config, because this enviroment can only config by customer. May I know the problem might live on if built type as development before?

UserImage.jpg
Hanh Pham Mai My

I have tried as development type in dev enviroment, and It worked. But when work in uat app and build app through testflight, I am facing this issue

UserImage.jpg
Ricardo Silva

So it looks like it's a configuration issue. Can you share more information about the configuration you currently have?

UserImage.jpg
Hanh Pham Mai My

For cetificate: I select this one 

UserImage.jpg
Hanh Pham Mai My
Solution

I found the solution, when implement in dev enviroment, I use registerdevice on Onready and it work well then I recheck code I try to remove to check whether it still work and it still work then I decide to remove this code and deploy on production enviroment and it's a problem. We must use register device for ask permission

UserImage.jpg
Ricardo Silva
Solution

Hey there!

Official documentation states that anything installed via TestFlight needs to be sent through the production URL. With this, I believe that you would need to upload not the APNs key but the Product APNs certificate.

BR.

UserImage.jpg
Hanh Pham Mai My

I already upload Product APNs certificate into app, firebase and it still does not recieve push notification

UserImage.jpg
Ricardo Silva

Can you perform any other operation, like Subscribing to a topic or Registering your device?

UserImage.jpg
Hanh Pham Mai My

Yes, after login to the app I call register and gettoken then storage in database, when perform action push, I query token then send push. In android device, I still recieve push from ios app and adroid send but in ios app not

UserImage.jpg
Ricardo Silva

Does the issue only happen with TestFlight? Have you tried with an app generated with the `Development` type?

UserImage.jpg
Hanh Pham Mai My

Yes. Happen on test flight. I dont see setting push notification of app on Iphone device. I generated app with app store type. Is it correct?

UserImage.jpg
Ricardo Silva

Yes. But have you tried with a `development` type? To understand where the problem might live on. 

UserImage.jpg
Hanh Pham Mai My

I am not sure for previous config, because this enviroment can only config by customer. May I know the problem might live on if built type as development before?

UserImage.jpg
Hanh Pham Mai My

I have tried as development type in dev enviroment, and It worked. But when work in uat app and build app through testflight, I am facing this issue

UserImage.jpg
Ricardo Silva

So it looks like it's a configuration issue. Can you share more information about the configuration you currently have?

UserImage.jpg
Hanh Pham Mai My

For cetificate: I select this one 

UserImage.jpg
Hanh Pham Mai My

Do I need config in background mode: push notification on capacities?


UserImage.jpg
Ricardo Silva

If you're using the supported Firebase Cloud Messaging plugin, that should be already enabled.

UserImage.jpg
Hanh Pham Mai My

So can u review all config that I attach?


UserImage.jpg
Ricardo Silva

At first glance, it looks ok. How different is it from the one you used for the `development` one that worked fine?

UserImage.jpg
Hanh Pham Mai My

I dont see different. But I removed logic register device when launch app. I just call get token when launch app. I wonder whether it' s a issue. If it is the issue, why android can recieve push notification?

UserImage.jpg
Ricardo Silva

They're two different platforms. What works for Android doesn't necessarily have to work for iOS.

I advise you to look at the Sample App that's available with the plugin and see how things are done there.

UserImage.jpg
Hanh Pham Mai My
Solution

I found the solution, when implement in dev enviroment, I use registerdevice on Onready and it work well then I recheck code I try to remove to check whether it still work and it still work then I decide to remove this code and deploy on production enviroment and it's a problem. We must use register device for ask permission

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.