I am new to OneSignal as I used to use appCenter.
I need to enable push notifications but I am not clear on the following:
Can I just use an APNS Key and an existing certificate that is notification enabled?
If not how many Certificate do I need? Do I need to create both a Distribution certificate and an Apple Push Notificatoin Service?
With appcenter I used to just have an APNS Key.Can someone clarify this for me
Can I just use an APNS Key and an existing certificate that is notification enabled?
Actually, that can't.
If not how many Certificate do I need? Do I need to create both a Distribution certificate and an Apple Push Notificatoin Service?
Yes, you need to create both of them.
Distribution Certificate: Used for publishing to AppStore or Ad-Hoc.
Apple Push Notificatoin Service: Used for pushing notification.
The difference is Apple Push Notificatoin Service not need to generate a provisioning profile , just export the Certificate to .p12 file, and upload to OneSignal. However, Distribution also need to generate a provisioning profile, that's a noraml publishing process.
Here you just need to upload the .p12 file to OneSignal.
More info can refer to Create A Certificate Request Manually.
Related
I have an IOS Xamarin project that uses firebase for push notifications. The push notifications are working on a debug build. I uploaded the project to Test Flight and push notification are not receiving anymore.
I have a development certificate and a production certificate. I am using an App Store provisioning profile. I have tried revoking and making new certs. I have added FirebaseAppDelegateProxyEnabled - Yes to the info plist. I am receiving firebase tokens in test flight.
Thanks
You must add as well the APNS/Certificate for Production on Firebase, it happens all the time. Check you have both of them.
Better still if you use the P8 Key. In this case you don't need any other certificates whatsoever. For Firebase is the best approach, comment if you need more help.
Cheers.
I have an issue with receiving notifications on Twilio Chat with Production APN Certifications, i get the error:
Error - 52131
Invalid APNs credentials
Possible Causes
Credential (certificate and private key) is invalid.
Certificate expired.
Possible Solutions
Make sure you have valid certificate and private key provided in your Credential.
When I test my sandbox APN certifcates the push notifications work perfectly.
However when I create APN PUSH SERVICES Certification and upload these and link them to my programmable chat function I get the error message: 52131 - Invalid APNs credentials... https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f
Just to clarify, the push notifications work perfectly on my development project. I use a Sandbox APN certificate, and selected the Sandbox tick box
However in the production version, where I am using:
Specific APN Apple Push Services Certificate, for a unique APP ID I
get the 52131 error.
I did not tick use for sending to Sandbox credential. As it is a
push credentiual
I followed all the instructions perfectly for exporting the
certificate keys.
I also use separate API Keys and a separate Programmable chat.
I get registration of bindings but no notifications as the
certificate is invalid, which I cannot see why as I checked by regenerating a certificate many times
I read in some responses to similar issues having the Sandbox and PUSH SERVICES APN certificate in the same App ID? Or not using the same CertificateSigningRequest to generate the Sandbox and PUSH? Why would this make a difference?
This was the thread: https://github.com/twilio/voice-quickstart-objc/issues/101
Finally after several weeks of emailing Twilio support I found the answer.
Basically the issue was probably because I extracted the Keys from my distribution certificate somehow and not the Push one. So make sure you are extracting the correct keys from the correct certification. Also because I was deleting and removing the push credentials from Twilio so often the bindings to my users were pointing to old Push Credentials that did not exist, so I removed the bindings allowing new bindings to be regenerated connecting to the new Push Certificate SID.
Other things that are important for production notifications on twilio programmable chat:
Make sure your environment entitlements file is set to "production"
Don't check the sandbox option on your production certificate (of
course)
Sometimes there can be issues when creating a Push Certificate using
a certsigningrequest that was used on a sandbox certificate. Try
creating a new Cert Signing file just for production
When you test your Production notifications these will only work on an appstore build built with your distribution certificate. You cannot receive notifications on the simulator (obviously). You cannot receive notifications from an app built using development certifcate...so you need to build and upload your app to testflight to test the notifications then preferably test between two real devices...or just send notifications from the simulator to a device with an appstore/adhoc build on it
I cannot thing of anything else for now that I came across. Twilio support is very good and will try and answer your question if you need help.
This link says Configure Worklight to use the correct credentials for sending push notifications.
That sentence is not talking about a Worklight license.
In order to send push notifications you need credentials from the vendor from which the notifications will be sent.
In the case of Google, those will be the GCM key and project number.
In the case of Apple, you'll need to supply a certificate and its password.
Please follow up-to-date guides instead of articles from 2013...
To familiarize yourself with push notification in MobileFirst Platform/Worklight, read the Getting Started tutorials: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/notifications/
How to setup your Apple Developer account and the push certificate is unrelated to Worklight/MFP. You can find many guides on the web (that are more up to date) explaining how you can do that.
once i submitted app to app store by enabling push notifications for that particular app id and i generated the certificate fro production and i saved in my server.
now i want to test my push notifications are working or not,now my doubt is if i use the same bundle id for my another project and keeping the same certificate which i generated for production apns on my server. if i send notifications now to that certificate will notifications work or won't work. i was confused totally after having lot of discussion with my friend.
in my point of view they won't work,but i am unable to clarify him clearly,let me know what is process once we send a notification to apple server by using particular certificate. whether it looks fro bundle identifiers or any thing
thankyou......
The process of push notification is that your server send message with the attachment of device token you added in the server end.
On apple server apple fetch the device token and send the message to the device token you send.
Now when the message received in iPhone, iphone check the bundle identifier that was registered with the certificate you have created at server level while enabling push notification.
And if that identifier matches with any of the app you have in your iPhone whether it`s the same app you have registered your push or other. It will only check the bundle identifier and show the notification on your device.
Now both the production and developer certificates are different so it will not show the notification if you are sending push from certificates generated with developer mode and checking on production application.
Regards
Abhishek Goyal
I am trying to make an app with push notification support. I already did everything in the apple documentation tutorial and I am sending the JSON payload from my server but the notification never arrive to my device (iPhone 3g). I also tried with Urban Airship and XtiFy but I got the same result...nothing arrive to my device.
I set my app id with push notification support, my provisioning profile, and I added an entitlemen.plist file to my app and I pasted the information in the provisioning profile file in it (everthing inside in the entitlements key).
The provisioning profile also has the " aps-enviroment " key and its value is development.
I do my .p12 file from my apple iOS push certificate and also contain his private key.
I don't know what should I do. I don't get any error in xcode nor my server nor Urban Airship nor XtiFi.
But the notification still doesn't arrive.
Thanks for any help.