How to create the certificates and provisioning profile correctly for use of Push Notification?

Asked

Viewed 547 times

0

I need help creating a certificate for provisioning profile correctly to Push Notification. Because I followed several different tutorials, and in all of them I did not succeed. Only in a moment I used the provisioning profile Team that I was able to receive the notifications.

I have experience creating certificates for iOS as I already have 2 apps published that use push notification. But somehow I don’t know what’s going on.

Coincidence or not, I’m not getting it after the recent updates that accompanied the launch of iOS 8.

  • What exactly isn’t working out? You even made the request for push and receive some response on your server even if negative?

1 answer

1

The launch of iOS8 brought some changes to the way devices receive notifications. I do not know if the problem you are referring to is about that aspect or even about the certificate created. So I will try to answer you both.

At first, 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)];
        }

About the certificates themselves, when you want to create an application with Pushnotifications you have to create a different Appid.

  1. The Bundle Identifier can’t be a wildMask(that is, use * to allow multiple applications with different names).
  2. When creating this Appid you have to ask for pushNotification authorization (for both development and distribution). inserir a descrição da imagem aqui

This process requires you to create a certificate. Follow the explanation given on the page and the departure should not have major problems. inserir a descrição da imagem aqui

  • Thanks from @Dasilva, I will try again. I tried several times.... and did not succeed. :/

  • check if you are receiving the device token in the app??

  • Yes I get the normal token. As I told you, my problem is not in the code, it is in provisionament profile

  • It’s not just that!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.