0

My Xamarin.Forms.iOS app is showing "Failed At: Registering with APNS" when downloaded from the AppStore. I proceeded to test it on my device and debugging mode lets me send Sandbox notifications just fine. I on the other hand can't send notifications when testing with "TestFlight".

I followed a tip I saw in Stackoverflow about adding a second entitlement file and changing 'aps-enviroment' to "production", but this has not worked. In Test-flight I not longer get an error, but I am still unable to receive notifications on my device.

  • I noticed that when using Visual Studios Mac "Automatic Provisioning" my distribution provisioning profile becomes invalid.

List of things I am using: *Azure notification hub. *Visual Studios for Mac. *Xamarin.Forms *Xamarin.Azure.NotificationHubs.iOS

I need help please.

ScarletMerlin
  • 465
  • 4
  • 24
  • 1
    Check [here](https://stackoverflow.com/questions/24044298/why-push-notifications-is-not-working-on-testflight) ,maybe you can get solution. – ColeX May 18 '18 at 09:07
  • Sorry, but it doesn't help. I am registering just fine. but only sandbox notifications are working and production do not work. – ScarletMerlin May 18 '18 at 18:34

1 Answers1

0

Ok, I found the answer after 2 days of trying everything I possibly could!.

List of things I am using: * Azure NotificaitonHub. * Xamarin.Forms.iOS * The Entitlement file under source has an Aps-enviroment key that needs to be set to production manually. "development is for debugging only and it has been a bug for a while"

This is the solution:

1) I went to "Certificates, Identifiers & Profiles" created a push notifications key under the key section.

2) I Copy the Key Id, prefix, and id for my app. I also Open the downloaded key and read it with a text editor and copied the token.

3) I logged into Azure went to the notification hub section and added my key information in the Apple section under Token. Once This was done I could properly send production notifications again.

ScarletMerlin
  • 465
  • 4
  • 24