i have setup all the steps for push notification using https://firebase.google.com/docs/cloud-messaging/ios/first-message#access_the_registration_token but i didn't get notification in ios App but working in Android App and also with http://pushtry.com .how to resolve this issue
Asked
Active
Viewed 3,923 times
0
-
its urgent can any one help me out – sunil kalwani Sep 06 '17 at 10:12
-
Have you uploaded P12 Certificate on FCM.? – Varinder Singh iPhone Dev Sep 06 '17 at 11:57
-
yes i have uploaded the certificate on fcm – sunil kalwani Sep 06 '17 at 12:02
-
which mode you are using.. development or Production mode? – Varinder Singh iPhone Dev Sep 06 '17 at 12:04
-
development mode – sunil kalwani Sep 06 '17 at 12:04
-
FIRInstanceIDAPNSTokenTypeSandbox OR FIRInstanceIDAPNSTokenTypeProd. in Appdelegate.m file? – Varinder Singh iPhone Dev Sep 06 '17 at 12:06
-
FIRInstanceIDAPNSTokenTypeSandbox – sunil kalwani Sep 06 '17 at 12:07
-
@ Varinder Singh i don't know much about Appdelegate.m because i used ionic – sunil kalwani Sep 06 '17 at 12:20
-
See Enable push notification in info.Plist Que — https://stackoverflow.com/q/37458530/4970453 And check Ans—— https://stackoverflow.com/a/39227289/4970453 – Varinder Singh iPhone Dev Sep 06 '17 at 12:23
-
i have enabled push notification in info.plist file it working when i use pushtry.com but not with my backend – sunil kalwani Sep 06 '17 at 12:27
-
using Google FCM tester or iOS APN tester ? in pushtry.com – Varinder Singh iPhone Dev Sep 06 '17 at 12:31
-
i have used iOS APN tester – sunil kalwani Sep 06 '17 at 12:34
-
FCM device token is Diffrent from APNDevice token. maybe your device token is wrong. FCM Ios Token is 150+ character ,APN token is just 64 bit – Varinder Singh iPhone Dev Sep 06 '17 at 12:39
-
my token is this 05f81c77efce6c079fc0a92cdea69ddc5c161c8ae8b5f87257c6cac2adce5f37 – sunil kalwani Sep 06 '17 at 12:40
-
its APN token not FCM token.. which plugin you are using.? Have a look on https://github.com/fechanique/cordova-plugin-fcm – Varinder Singh iPhone Dev Sep 06 '17 at 12:57
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/153787/discussion-between-suniel-kalwani-and-varinder-singh). – sunil kalwani Sep 06 '17 at 12:58
-
i have used phonegap-plugin-push – sunil kalwani Sep 06 '17 at 12:58
1 Answers
2
I was facing the same problem and after searching for a day here are my conclusions:
Don't forget to allow for push notification in your App ID.Click on edit and then enable push notification.
Make sure your certificates you are using are correct because as you allow for push notification your previous profiles become invalid(In my case they were).So either edit the provision profiles and download again or create new ones.
3.I'll prefer using
Apn-auth
key as suggested on main firebase site instead ofapns
certificates.
4.One of the major point which I was missing was the problem with
xcode
Enable push notification there in thexcode
as well which are not enabled by default.
- If your app is closing soon after opening your plist might be the cause Follow this answer for solution .
- Last thing that really helped me fix the issue was a mac OS update.I was trying to build using xcode 7.2 which was quiet dumb part on my side.There when I tried to enable push notification.It made changes to my certificates and then I downloaded the provisional profile after editing them(So valid now) and then build and everything started working fine as hell.

Black Mamba
- 13,632
- 6
- 82
- 105
-
can we use Apn-auth key for both development and production mode ? – sunil kalwani Jun 14 '18 at 07:36
-
-
-
1