Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Push Notifications not received in iOS 9/10 after switching it on Capabilities

I've tried to adapt my application to iOS 10, but I am facing issues with push notification. I have tested push in two devices with iOS 9 and iOS 10. In my application in Capabilities push notification does not switch on, but application work fine in iOS 8 and iOS 9, but in iOS 10 i can't take token with error:

Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application"

I switched on Push Notification in Capabilities, and push Notifications works, sometimes it works fine in iOS 10, but next morning, I tested it on iOS 9 device and it did not work, I switched to iOS 10 device and push is not working on it as well, I went back to old version, without turning on Capabilities and it works fine in iOS 9 device, but in iOS 10 does not (token). I tried removing and download provisional profiles, remove all cache in Xcode, erase devices, I tried Push notification issue with iOS 10 but it did not worked.
How can i fix it ??

like image 674
Sergio Avatar asked Sep 15 '16 17:09

Sergio


People also ask

Why are my push notifications not working iPhone?

You can fix an iPhone that's not getting notifications by restarting it or making sure notifications are turned on. You should also make sure your iPhone is connected to the internet so apps can receive notifications. If all else fails, you should try resetting the iPhone — just make sure to back it up first.

Why are push notifications not working?

Settings > Sounds & Vibration > Do Not Disturb: if this setting is enabled, Push Notifications will not be received. Make sure this is disabled. Settings > General > Background App Refresh: this setting allows the app to run in the background and must be turned on.


1 Answers

I found solution, in my case: Before iOS 10 we used only Production sertificate to test push, it work fine, but after iOS 10 pushes do not receive in app runing with Xсode(but receive in TestFlight), after we create and use developer certificate to sign pushes - it work again

like image 194
Sergio Avatar answered Oct 01 '22 02:10

Sergio