RegisterForRemoteNotificationTypes not working?

I am trying to implement password sending alerts. I set it all up for my other application and it works great. However, I am trying to implement it in the application that I am currently working on. The thing is, I just can't get it to work.

I do this in the applicationDidFinishLaunching method:

[application registerForRemoteNotificationTypes: (UIRemoteNotificationType) (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; 

I also updated the provisioning profiles, installed the application in Parse, and made sure that push notifications were enabled on the portal.

Therein lies the problem in which a warning is displayed indicating whether I allow the inclusion of the Push Notifications application. I have no idea why. I am doing the same thing in my other application and it works great, so I'm not sure why this is not working.

Does anyone have any ideas?

+7
source share
3 answers

It turns out that my training profiles in my Organizer were not updated from the portal for some odd reason. I had to log out and log in. Then I updated it and it worked.

Another thing I checked is that my provisioning profile has something called: aps-environment or something similar to this, and this did not help me make me believe that it was not my code which was wrong.

+11
source

This warning will be displayed only once. If you want to show it again, Apple recommends uninstalling the application and leaving N hours before installing the application again. I donโ€™t remember that N is on my head, but Iโ€™m sure itโ€™s 24 hours.

+1
source

This was really perplexing until I noticed that he was working on installing on an older device running ios6. After inspecting, I found: registerForRemoteNotificationTypes: is not supported on iOS 8.0 and later , and this solved my problem.

+1
source

All Articles