My app just got ready for sale on App Store, but none of my production devices (devices that have installed the app from App Store) are getting push notifications. When I tr
"The credentials supplied to the package were not recognized" exception usually indicates that the user running the code does not having enough permissions.
If you are sending push notifications from Azure web app or webjob do not load the APNS certificate from a file or base64-encoded string. Go to Azure Portal and add the certificate to website instead. Note the thumbprint.
Next add WEBSITE_LOAD_CERTIFICATES setting and set it to * (asterisk).
Now the APNS certificate can be used from C# code:
string thumbprint = "YOUR THUMBPRINT";
var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly);
var certificate = store.Certificates.Find(
X509FindType.FindByThumbprint, thumbprint, validOnly: false)
.Cast().SingleOrDefault();
var apnsConfig = new ApnsConfiguration(
ApnsConfiguration.ApnsServerEnvironment.Production, certificate);