How do I create the certificates and the provisioning profile correctly for Push Notification use?

0

I need help to properly create a provisioning profile certificate for Push Notification . Because I followed several different tutorials, and in all I did not succeed. Only at a time when I used the provisioning profile of Team that I was able to receive notifications.

I have experience creating iOS certificates as I already have 2 published apps that use push notification . But somehow I do not know what's going on.

Coincidence or not, I'm not getting it after the recent updates that accompanied the iOS 8 release.

    
asked by anonymous 12.11.2014 / 23:31

1 answer

1

The launch of iOS8 has brought some changes in how devices receive notifications. I do not know if the problem you are referring to is about this aspect or even about the created certificate. So I'll try to answer you both.

In the first case, with iOS 8, the way you implement and process notifications is different:

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
        {
            [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings
                                                                                 settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge)
                                                                                 categories:nil]];
            [[UIApplication sharedApplication] registerForRemoteNotifications];
        }
        else
        {
            [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
             (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
        }

On the certificates themselves, when you want to create an application with PushNotifications you have to create a different AppID.

  • The bundle identifier can not be a wildMask (that is, use * to allow multiple applications with different names).
  • When creating this AppId, you have to request authorization for pushNotification (both for development and for distribution).
  • Thisprocessrequiresyoutocreateacertificate.Followtheexplanationgivenonthepageandthematchshouldnothavemajorproblems.

        
    12.11.2014 / 23:52