I'd like to test my push notifications feature on iOS. I'm working with DevExtreme, a framework based on phonegap.
Following what I made in the past, I made the following steps:
Create the certificate. Here, I chose the "Apple Push Notification service SSL (Sandbox)" option. First question: is it right? I will use FCM.
Create the APP id, enabling push notifications
I need to create a template of my app, so, I need also the Provisioning Profiles. I try to create it selecting "iOS App Development" when creating it. Then, I can't see the created certficate.
What I tried to fix the point 3 is create another certficate selecting "iOS App Development" using the same certSigningRequest as point 1. I created a provisioning profile lined to this certificate. When building the template, I tried to use this file as provisioning and the certificate of point 1 as certificate, but I'm getting the error "The default keychain doesn't have an identity matching".
So, now I'm stuck here, because I don't know how can I test my push notifications feature on an iPhone device. Any ideas?
UPDATE:
Now,I'm trying to do the following: create the APN certificate and use it only for the upload to FCM. Then, create the certificate and profile for the as usual, selecting "iOS App Development" when creating the certificate and link it to provisioning profile.
Is my idea right?
UPDATE: Summarized all the steps here: https://programmingistheway.wordpress.com/2017/07/19/devextremephonegap-how-to-manage-push-notifications-with-fcm/
It’s because you are mixing up the 'Distribution Provisoning Profile' with the 'Development Provisioning Profile'.
Remove old provisioning profiles from your keychain and follow these steps.
Related
On the iPhone Provisioning Portal, the team provisioning profiles with the specific ID is invalid.
As I did some research on net and it said I should click on the Xcode preference, then click the view details about the account, and then click the refresh button on the bottom right corner but I could not find it.
First thing is that you can create,edit or delete provisioning profile (developer,distribution) or certificates which wont effect the apps already live (on app-store). But it will effect the apps that you are using in your current project for testing in Device.
You can Delete all provisioning profiles and certificates. But you have to create again for testing your app in to device as well as upload new app on app-store from iTunes connect.
Apple provide Very nice and clear documentation please read bellow link for more clear
Provisioning and Development
Push Notification
The push certificate cannot be renewed. You have to create a new one.
The push notification certificate is not part of the application build. Therefore for push to continue working you only have to create a new certificate and deploy the p12 file (or whatever other format you are using) at your server. You don't have to submit a new version of your app.
Regarding refreshing the accounts and provisioning profiles, check here and here.
I've just finished my app, and so I am now getting ready to submit. But I need to change my developer Push certificate to Ad Hoc to test it with a Production Push certificate.
I thought I had it all figured out, but when I build the app, I get the error:
"Failed to get the task for process 2023" (The number changes every time I build.)
I have created my provisioning profile, and I am able to navigate to my Project's Build Settings and set the app to use my Ad Hoc profile. However, when I attempt to set my Code Signing Identity to "Apple Production Services..." all I see is my Distribution Certificate, not the Push Certificate.
What is going wrong?
I found the problem. I actually did have everything done correctly the first time. I just didn't know that I couldn't build on my phone through Xcode using an Ad Hoc provisioning profile.
So I ended up testing it by downloading the Beta via iTunes.
First of all, when you transfer all the Development Certificates to the Production you cant build the project from Xcode.
No one see push certificate in code signing identity.
You only see Either Development certificate or Distribution certificate depending upon the provision profile you have selected. You don't have to worry to choose Push notification certificate in Xcode, coz its managed by Apple once you enabled the push Notification service to the app by enabling it with unique bundle identifier in developer account. https://developer.apple.com (Only you have to give the merged version of that APNS certificate and distribution certificate in .pem format to web developer )
For Adhoc You have to generate Ipa of your project form xcode and install in you mobile through external link like http://www.diawi.com, if you import Ipa into your device from iTunes remote push notification will not arrive.
iOS Push Notifications not receiving with AdHoc Certificate. A different device token is also getting generated and in backend there is no error. But the device is not receiving Notification.
This solved my problem:
While creating Production SSL certificate, do not change the name "aps_production.cer".
And before creating Development related certificates, first create certificates(SSL,provisioning,p12) for only production.
It really worked for me after trying different approaches.
For my case, Xcode picks one of the Provisioning Profiles in my machine even if I set it to the correct one.
What I did is, everytime I export,
(WINDOW > ORGANIZER)
I check the Provisioning Profile in the summary. If it is not the provisioning profile that exists in the developer account, I click the arrow (in the right of the provisioning profile) to see finder then I delete it from my machine.
After that, I tried to export again until I see the correct provisioning profile.
Follow this link step by step....
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
I'm following Parse's Push Notification Tutorial for setting up my Parse app to now be able to send Production push notifications, rather than Development ones, so I can get it ready for the app store. This is covered in section 7.1 in the tutorial.
When I attempt to create an AdHoc provisioning profile, it only works if I create an iOS distribution certificate, when I create an APN production certificate, which is the correct one for this purpose, it shows me this:
If I decide to go ahead and use the iOS distribution certificate from this list instead:
The provisioning profile is successfully created, but again, it's not using the correct certificate for push notifications. Likewise, because I had to use the distribution one to create the profile, I therefore would have to use the certificates .p12 file when connecting my Parse Notification settings to this profile. When I attempt to do this, I unsurprisingly receive the following error:
because I'm uploading the .p12 of an iOS Distribution certificate, and not the APN Production iOS certificate. When I try uploading the .p12 of the APN Production iOS certificate to Parse, it works, but my test iOS device doesn't receive push notifications, because the provisioning profile doesn't use that certificate, as I mentioned earlier.
Am I following the directions incorrectly? Why can't I make a provisioning profile using a Production APN certificate, so that it can work with Parse Push Notifications?
I have never used parse, but you have two exact production certificate.
This is an issue, revoke one of them and try again should work!
the provisioning profile doesn't use that certificate
I think you are misunderstanding what you need to do:
delete the app from your device
Build your app signed with distribution certificate
Install the ad-hoc version of the app on your device
Here is an image to illustrate how the provision profile works:
It's a good idea to check apple docs out
Also very important to check which provisioning profile you have used to sign and build the app.
Turns out my error was forgetting to set the code signing settings in both Project AND Targets.
I'm following this tutorial to set up push notifications for my iOS app, using Parse. When I get to part 2, which involves creating a new Provisioning Profile, I get to step 6, and see this:
When I look at my certificates however, I see that there is in fact one there:
I've tried following other stackoverflow posts that address this issue, and it doesn't seem to fix my problem, perhaps because the layout for the Appe dev website seems to have changed a bit. Why aren't I able to create a provisioning profile to set up Parse Push Notifications?
The certificate you created is intended to be uploaded to the Parse website, in the settings section of your app. You need to create a separate certificate to go with your provisioning profile. Create a new certificate, and select either iOS App Development, or App Store certificate, depending on what stage you are at. I'm assuming it's Development in this case. You don't need to attach the Push certificate to your provisioning profile.