InvalidApnsCredential while sending notification over GCM - ios

Since yesterday (21.2.2018) we receiving InvalidApnsCredential while sending push notification to ios devices over GCM. We checked certificate base on https://developers.google.com/cloud-messaging/ios/certs and both certs (for development and production) are valid until feb/2019..
I'm curious if something changed on GCM side .. couldn't find anything plus we didn't change our server side.

So after email conversation with google support I have to transfer project to firebase (without changing server app.).
On the console (enter link description here), select 'Add project'.
Click on 'Project name' drop-down.
Select the project configured with GCM.
Click on 'Add Firebase'.
Then recreate .p12 file based on these steps : enter link description here

Related

Sending Push from app id to different app id using Parse

I am using parse.com services.
I understood how to send push notification from one app id to the same app id, works well, but i would like to create an app called " host app " which will send push notification to the app called " guest app ", how does the certification and installation work ?
2 AppID, on .p12 certificat for both, 2 application Id on parse.com ?
Moreover, can I send APN from dev app to production app ?
Thanks for helping me,
You can have multiple apps created in Xcode that use the same parse app id. You can put a column in the installation table to filter by a specific app and only send pushes to that one.

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.

Plateform to manage push notifications with PhoneGap

I used Cordova PushNotification Plugin to add push notifications to my PhoneGap app (this plugin). It worked when I used a simple php script with a particular device token to push a notification (with this script).
I did this for one device, but I know it's a little bit different when it comes to multiple devices. So, is there any plateform that allows a user to manage push notifications (like https://parse.com/products/push) ?
Thanks for your answer :)
Yes, there's a platform that's perfect for what you want: pushwoosh. You can easily add it to Phonegap.
**EDIT for more information for iOS you can search here:
iphone configuration guide
SDK integration
These are the steps you must do:
First you must register in Google APIs site, select Services: https://code.google.com/apis/console/
Turn the Google Cloud Messaging toggle to ON
In the Terms of Service page, accept the terms.Now you need to create the Server Key
Press “API Access” button
Press “Create new Server key”. Either a server key or a browser key should work. The advantage to using a server key is that it allows you to whitelist IP addresses.
Press “Create”.
You can find your GOOGLE_PROJECT_ID from the URL in your Google API console. Usually it looks like this: https://code.google.com/apis/console/#project:12345678912:access In this example, it would be: 12345678912
Enter in Pushwoosh copanel: https://cp.pushwoosh.com/
Create or enter in My Apps menu
When you enter into an app you'll see the Application code in that page or in the navigator's url and this will be your PUSHWOOSH_APP_ID
Download de SDK and insert it in your project.
Change the pushnofitication.js to point to your project ID and Pushwoosh app.

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