Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS application missing from notification center [closed]

Problem: The app doesn't appear on notification center and it is unable to receive push notifications right after installation completes and the app registers for push notifications via registerForRemoteNotificationTypes:.

Details:

  • The app usually appears in notification center after the device is restarted and after that everything works just fine.
  • Sometimes the app shows up in notification center right after intallation and registration for APNs(I still can't confirm this but I think I stumbled upon such situations).
  • The app calls the method registerForRemoteNotificationTypes each time a user logins and each time a user logouts respectively with bit masks (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound) and UIRemoteNotificationTypeNone.
  • enabledRemoteNotificationTypes returns correct values.
  • Initially I used the method unregisterForRemoteNotifications on logout but I changed it to registerForRemoteNotificationTypes:UIRemoteNotificationTypeNone due to suspicians that this could be causing the problem .
  • This problem occurs in both development and adhoc builds and irrespectively of whether the app is installed via xcode or itunes.

Any thoughts and advices will be greatly appreciated. Thank you!

like image 359
e2l3n Avatar asked Feb 07 '13 17:02

e2l3n


1 Answers

This was happening to some of my devices. (Not showing up in notification center and not receiving pushes.)

Managed to fix it by doing:

  • Delete the app
  • Delete all the relevant profiles from the device. Settings app > General > Profiles, then tap into each of the Provisioning Profiles related to your app, then tap Remove. On iOS 8/9, where the setting no longer exists, use XCode > Windows > Devices > select device > Show provisioning profiles... > then remove the profile(s)
  • Turn your phone off, then on again.
  • Give 5 mins
  • Reinstall your app, the Provisioning Profile should get installed automatically.
  • Launch app and let it register and stuff.
  • Test push notifications again

For us, it didn't work immediately, so give it a few minutes.

like image 100
just.jimmy Avatar answered Oct 24 '22 13:10

just.jimmy