I've developed an app with Ionic for Android and iOS devices.
I'm having trouble with the notifications for iOS. In development everything works fine, but in production, when I send the notification, it gets back to me with this error: `
APNS_BAD_DEVICE_TOKEN
The certificates that I've uploaded on ionic.io are the ones generated by distribution, I'm positive about that. APNS certificate such as APP Store one and Provisioning Profile as well.
If I download the app from the Apple Store i get the error I wrote before, and if I create it from Xcode, it works perfectly. Plus it generates two different device tokens (one with the App Store and another one from Xcode).
I've deleted and created the certificates many times, and everything is still working like that. I'm pretty lost here, can anyone help me out?
If you are installing directly to your phone from Xcode, then you have to use Development security profile and make sure you are sending the notification from server side to iOS devlopment sand box. If you are using TestFlight/AppStore you need to use Production profile and make sure you are sending the notification to iOS production sandbox.
Related
I am working on an iOS application that rely heavily on push notifications. We are planning to use Firebase Teslab to test it.
We have managed to get some simple test running on the firebase devices.
But we are encountering a blocker as the devices on firebase are not able to register/receive push notifications. Everything works fine when we are testing locally. The issue is probably that device on firebase don't have the required certificates or provisioning profiles.
I was wondering if anyone has managed to test application with APNS on firebase test lab.
Thank you in advance for the help.
As you already concluded the issue is due to certificates and the provisioning profiles. Test Lab resigns the app to be able to run it in their infrastracture. Unfortunately this means that only a small set of entitlements is supported. I'm not that familiar how APN works, but I assume there is also an authentication step that happens with the server and since the provisioning profile is replaced it won't authenticate your app correctly.
I'm trying to develop two iOS Apps that can share calls.
using twillio sdk everything is working fine as expected,
App A should be able to call App B,
App B should be able to only receive calls from App A,
I submitted the two apps on testflight and they were accepted
App A is working perfect
but concerning app B if i run it through xocde it works perfect, while if I downloaded it from testflight it doesnt recieve any call,
I also tried generating an adhoc certificate and send the app to my device using diawi but it also doesn't work.
can anyone help me in resloving this issue, any advice may help in my case.
Does anyone knows any needed entitlement that should be fixed in order to receive a call.
Actually it turned out that the issue was in the VoIP certificate (p12 file) provided for the backend server-side, I never switched it to release. I kept it on development. once I tried switching it to release after release on testflight. everything worked perfectly.
Ok, so I have an app that is in the app store. In development everything works fine I get all of the notifications that I send. I should mention that we are using Firebase for analyics and push notifications as we have a iOS and Android version of the app. Firebase account has both the correct development and correct production apns cert, the app's capabilities are set correctly to include push notifications and remote notifications in the background.
In the organizer window the entitlement for apns-environement is set to production whenever uploading to the app store or when exporting the app. Whenever the app is first installed and ran the alert to allow push notifications is shown. So my apns certs have to be configured correctly.
I am a working on contract for this company, just started 3 months ago, I would hate for these people to look at me in a bad light but I really don't know where the issue is. I am also using Xcode's automatic code signing option, with the correct provisioning profile and developer account signed in the Xcode on this mac.
Just went through this and I do not know if you solved this,
I turned push off and deleted the certs from apple dev center and created them all over again and this made everything work as it should.
I also had this line of code set to,
FIRInstanceID.instanceID().setAPNSToken(deviceToken as Data, type: FIRInstanceIDAPNSTokenType.sandbox)
I will change it to .prod when I push to the app store.
I added push notifications to one of my apps using Parse about a month ago, and it went through the review process fine and was pushed as an update through the App Store. Since then, everything has been going fine I've been using the REST API to send the notifications to all users.
Yesterday, I added push notifications to one of my other apps, following more or less the same process, and was able to get them up and running (while I have not yet submitted the update to the App Store, I have set up the production push provisioning profile).
Today, push notifications for the former app in production stopped working; the pushes successfully send through Parse, and they are delivered to my test device, but they are delivered to my test device only. That is, no production apps are receiving push notifications.
I suspect it is something to do with provisioning profiles, but I don't know how to fix it. I've looked around and everything I could find was related to production vs. development provisioning profiles for the app having the issue, which is not the case here since it was already working in production up until this point.
I have no idea how to go about finding the source of this issue (let alone solving it); any ideas?
So, I think you can probably make use of the Parse platform to check whether the certificate you exported is valid or not. If that's valid, that means that you don't have problem on the exportation.
Then, go check the the App ID you create in the Apple Developer Program whether it's enabled the production version and match the identifier you set in Xcode. In the same time, check whether the provisioning profile is from that App Id. If so, go ahead and open Xcode.
When you deploy to your test device, remember to change to the release mode instead of development mode. Also, better to change the code signing manually.
If the problem is still existing, I think you can probably delete all of your provisioning profiles in Xcode and do the process again.
We have a live app which sends push notifications just fine.
New version of the app, not yet released - we want to test that push notification works, but it seems all we can test is that the service is working. This test version which uses the 'sandbox' doesn't actually send a push to a development phone ....
Is this right? Is there a way I can test this new version of the app AND receive push notifications to my device?
Been trying to crack it for several days now.
Thanks in advance!
Andy
You need distribute the Distribution version of your app using ad hoc.
When your application ready for submission, you create an ad hoc provisioning profile specifying an App ID that matches one or more of your apps, a set of test devices, and a single distribution certificate.
Here is an image to illustrate how the provision profile works:
You need to first test the app in isolation to check that is working, then when it is move on to testing the app and server in combination.
To test your app in isolation run it in Xcode and put in a breakpoint or NSLog to find out what the APN token is.
Then use the php script from here
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
using your APN token and credentials.
It should work, and it should work in the sandbox, if it doesn't then your app isn't correctly configured so work at investigating why it doesn't work until you can send it a push manually.
THen once you can send a push manually test you can send one using your server, if you can't then it must be due to a problem with the server as you have just confirmed the app is working. If the server isn't working its probably not using the credentials or applying the password to the credentials, something like that