Getting “Platform application is disabled” from Amazon SNS - ios

I want to send notifications to ios device using amazon sns service
but the code return Platform application is disabled
how can I fix it

I check the expired date of p12 files using getPlatformApplicationAttributes method in the SnsClient
then I update the file of p12 now it work fine .

This error is caused when the p12 file you have uploaded to AWS is expired.
So go to AWS, create new one and follow the instuctions from the url below.
https://medium.com/#rajanmaharjan/create-push-notification-platform-for-aws-sns-ae6c845735b4

I also had this happen when I tried to send a notification to a device I did not have access to send to just FYI so it doesn't have to be just the cert that is wrong

Related

Cannot get push notifications with PEM file

I may sound like noob but I faced a problem and not able to find the solution. I searched all over the google and nothing.
Here is the problem.
I have an app that should receive push notifications. Until iOS 10 everything worked perfect, but now I am not able to receive notifications with my PEM file, instead I can receive them with my P12 file, but PHP won't accept P12, so I am stuck.
I have created my pem-s using this thread link
In my app code is written based on this link
One more thing.
I have tested my push notificatoins also using this website http://pushtry.com/ and in case I use PEM file and TEXT mode, I can receive push, but PEM file and JSON mode does not work. P12 works with both.
I don't know what to do. Please helppppp!!!!
I have found a solution, hope it will solve your problem.
First, use this link: http://apns-gcm.bryantan.info/ and follow their instructions , instead of pushtry.com
Implement all the methods related to remote notifications and make sure all these are updated.
If by mistaken or accidentally your app not enabled notifications for background mode then refer this link: https://www.iphonemanager.org/ios-11-notifications-not-working.html
I have followed these instructions and at my end apns is working.

iOS APNS: Transferring Certificates

I had an app that used the apns with my account certificates .. the owner of the app created a new apple account and i should transfer the apns to it
I make the steps that i did many times but it's not working
I'm using Rails rPush Gem for my server side and it tells me that the notification has been delivered but I got nothing on the phone itself .
Is there any specific steps to do so?
FOllow this tutorial
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
you will get a file named simplepush.php, add your Device token in the field of $devicetoken and your pen file and run the script if you get the notification then thee is no problem with your certificates

Push notifications issues: key,failed/message not reach

I'm still new to iOS dev.
And I'm very, very new to whole APNS idea. I followed many tutorials, and didn't go so well.
I'd like to ask some questions.
Can I use same .certSigningRequest file for dev/dist/apns certificates? Does it matter if some of this certificates from this .certSigningRequest have been revoked?
When I export my key in keychain to .p12 file, can I use this one for both dev/distribute version?
If my server open port 2195, by giving .pem generated from above cer, my server should be able to send push message, right?
How can I unsubscribe/unregister from my device and/or from server/apns service? I mean when I need to remove, and try to build&run the code again.
4.1 How does
[[UIApplication sharedApplication] unregisterForRemoteNotifications];
really work? Does it tell apns not to send message/just turn it off? How can my server/provider know if device need to unsubscribe?
I find this tutorial really useful: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
And here some questions I have about what I encountered.
1. The sample app from the tutorial worked fine, using both my laptop & my server to send a message. But after a few days, it doesn't. (the response is still 'Connected to APNS Message successfully delivered', but the message never reach my device)
What could be the cause? My friend have revoked a dev cert? (I shared acc. w/ my friends) Or I reinstall the app? I also tried method unregisterForRemoteNotifications & register again, but nothing happens.
2. I also tried https://apphq.shephertz.com for a provider. This one requires .p12 key file in their format. (link) I have another project (this one is unity) register apns thru the app. It seems fine since I can see device token & user store in the web. But when I tried to send message, I got an error, like
iOS KeystoreException Device ID : <my-device-token> : Invalid keystore password! Verify settings for connecting to Apple... Does anyone know what this mean?
Sorry for my poor English.

Which file should we use on server for push notifications, .pem or .p12?

I want to send push notifications in my app. Which file I should upload to the server for push notifications, .p12 or .pem?
If .p12, then what is the .pem file used for? I also checked some .NET and PHP code to see how they work.
// ("~/PushSharp.PushCert.Development.p12"))
C# used the .p12 file:
var appleCert = File.ReadAllBytes(System.Web.Hosting.HostingEnvironment.MapPath("~/PushSharp.PushCert.Development.p12"));
PHP used the .pem file:
$apnsCert = 'apns-dev.pem'; 
The difference between a .p12 file and a .pem is that the .p12 file containers both the public and private certicates used for encrypting the communication with Apple's push notification servers, whereas the .pem only contains the public certificate.
The one that you should be using on your server is the .pem file.
a little too late in the game, but what you definitely need is the p12. Make sure you give it a password. I just implemented it that way and it worked.
follow these links they help for for me
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
http://www.raywenderlich.com/32963/apple-push-notification-services-in-ios-6-tutorial-part-2

No push token given for ios using pushwoosh

I am trying to add pushwoosh through marmalade to mobile application (at the moment on ios device). Like on
http://www.pushwoosh.com/programming-push-notification/marmalade-push-sdk-integration/
I have add to Info.plist
<key>Pushwoosh_APPID</key>
<string>1****-A****</string>
(I create app on pushwoosh site adn copy code to Info.plist but I didn't configure anything for ios on site, there is nothing about that in tutrial)
But when I start application I get info
Response "200 no error": string: {"status_code":210,"status_message":"No push token given","response":null}
It enters ad OnRegistered callback but token is empty. Does anyone what is wrong ?
( I done like on tutorial link, there is no need to do anything with certificate in tutorial)
The provision profile you use must have push notifications enabled on that. You need to edit the mobilepovision from the Apple developer portal and add push notification.
"Blockquote I done like on tutorial link, there is no need to do anything with certificate in tutorial"
Have you configured Pushwoosh for your application according to Pushwoosh iOS configuration guide?

Resources