ios Push notification setup using appcenter (cannot make it work)

learningMobilelearningMobile USMember ✭✭

I am having trouble in deploying my iOS app using push notification.

I have an app (iOS) with an

  1. existing certificate
  2. existing AppId
  3. existing Provision profile

None of the above includes notification!

** I have followed few docs but the app still does not install properly.**

What I did

  1. Created a new APNS certificate (Sandbox and production)
  2. Updated the existing AppId and added push notification
  3. updated the existing provisioning profile and added push notification
  4. app still does not deploy.

What is the process when you already have appids,provisioning profiles?

  1. Do I need to create a new AppId(same name as old one) and provisioning profile or can I just edit the current ones?

  2. So do I require 2 Certs (01 for push and 01 for distribution?) or just the one that is push enabled for production?

Many thanks for any clarifications!!!

Best Answer

Answers

  • JamesMontemagnoJamesMontemagno USForum Administrator, Xamarin Team, Developer Group Leader Xamurai

    These can be very tricky, be sure to go through all of the docs for it: https://docs.microsoft.com/en-us/appcenter/sdk/push/xamarin-ios

    You do not need a new App ID, however you would need a new provisioning profile. Your certificate enables push notifications in it and is linked to the provisioning profile.

  • learningMobilelearningMobile USMember ✭✭

    @JamesMontemagno many thanks for your reply! Its driving me mad!!! The appcenter side of it I am pretty confident I have done correctly.But I will revisit.

    So let me understand this.
    I can edit my existing appId and enable push notification
    I will create a new provisioning profile.
    I will create a new APNS Certificate (Production)

    What happens to my existing distribution certificate ? Do I need both my existing distribution certifcate and my new Apns certificate or my Apns certificate supersedes the distribution certificate?

    In my azure pipeline which certificate I now use?

    Really really appreciate your answer. All the docs assumes that you are creating everything from scratch but I could not find any doc that takes you through the process when you have an app that is live and all of a sudden you want enable push notification?

    Thank you for your time!!

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    You don't need an APNS certificate. You create an APNS Key instead. You used to need APNS certificates, but not any more.

    The link @JamesMontemagno posted above actually describes this in full. There is quite a lot of Xamarin/Microsoft documentation which still refers to APNS certificates though.

  • learningMobilelearningMobile USMember ✭✭
    edited April 18

    @JemesLavery . I am new to push notification. Android was dead easy, but obviously struggling with iOS side of things.

    Let me get this straight

    1. I no longer need an Apns Certificate
    2. My Current and live Distribution certificate (no notification) is sufficient
    3. Edit my AppId (enable Push notification) (Apple developer site)
    4. Create new key (Apple developer site)
    5. Generate a new Provisioning profile
    6. I do all the APNs set up in appcenter as described here https://docs.microsoft.com/en-us/appcenter/sdk/push/xamarin-ios

    and I should be ready to do go is that what you are saying?

    No more (sandbox /production certificate correct?)

    many thanks for your time

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    @learningMobile said:
    @JemesLavery . I am new to push notification. Android was dead easy, but obviously struggling with iOS side of things.

    Let me get this straight...

    Yes, I believe that is the case!

  • learningMobilelearningMobile USMember ✭✭

    I am still struggling on this one and cannot get it Push notification working . Question in azure devops i have 2 tasks:


    What Certificate do you map to the first task and what provisioning profile you map to the second?

    What happens to my original Distribution certificate? Do I have to have 3 tasks (2 certs one of which push and a Profile?)

    @JemesLavery Can you point me to any documentation where it says that APNS Certificate is not required? I cannot find it.
    Unfortunately Appcenter documentation just says :

    "Please configure Apple Push Notifications service (APNs) for your app from your Apple developer account and the App Center portal before adding App Center Push to your app"

    Which does not help at all in the cause . That document that Montemagno refers to it only helps with the Appcenter side of things.

    Many thanks for any more suggestions guys. Really really frustrating experience!!!

  • learningMobilelearningMobile USMember ✭✭

    @JamesLavery thanks for you replying very helpful . I have done all the steps from scratch and my azure pipeline builds now
    Set up Appcenter , however When I try to send a message I get "0/0 sent" and no indication of what went wrong. Am I missing the obvious? How do I find out why my message did not send ? Any logs anywhere?

    Many thanks

  • learningMobilelearningMobile USMember ✭✭

    @JamesLavery thanks for your help . I have managed to send some push notifications in iOS ,other challenges but for now thank you

Sign In or Register to comment.