I'm trying to use the new Automatic Configuration in Xcode 5 and it seems that when I run builds on my iPhone it is downloading the wildcard provisioning profile and using that to run the app. This is no good because my app uses push notifications and the wildcard will not have the correct entitlements to register for push notifications.
Is there a way to specify to use the provisioning profile for the qualified app id so I can test push notifications?
Strategies I have considered:
Delete wildcard app id - You cannot do this
Delete wildcard provisioning profile - Xcode will recreate the wildcard provisioning profile
Specify the provisioning profile explicitly in the target's build settings
I don't know how to determine the explicit name with Xcode 5. I could download and open the profile in a text editor, but that can't possibly be the right way to do this
If I specify the provisioning profile, I will need to update it every time a new profile is generated (add a new device, profile expires, signing certificate expires). This defeats the purpose of automatic configuration.
I've poked around Xcode looking for such a setting and haven't seen anything useful
I have followed the steps here (for configuring Push Notifications) and when I refresh my provisioning profiles they are not updated.
Any ideas?
Xcode was not downloading the provisioning profiles because it did not find any app id MATCHES. It did not find any matches because the capabilities in the "Certificates, Identifiers, Devices" website did not match the capabilities listed in the project in Xcode. Because the app identifier has In-App Purchase and Game Center enabled on the website but once I enabled it in the project it automatically downloaded the relevant provisioning profiles.
Hope this helps someone else.
Related
I am supporting for one existing native iOS application. For this am able to generate IPA successfully from Xcode but while generating build from devops am facing the issue:
Requires a provisioning profile with the Push Notifications feature
How can I get past this error and build for my device?
A Provisioning Profile must be installed on each device your application code should run on. Each Development Provisioning Profile will contain a set of iPhone Development Certificates, Unique Device Identifiers and an App ID.
Devices specified in the Development Provisioning Profile can be used for testing only by those individuals whose Development Certificates are included in the profile. To create :
Login to the developer account connected to your project, and under Certificates, Identifiers & Profiles -> Profiles -> Register a New Provisioning Profile by clicking the add new button.
Choose for which purpose provisional profile is required.
a. For developement purpose. (the app can be downloaded only in registered devices if the application is in development stage. For this, The device UDID is required to be added in device list).
b. For distribution purpose ( The provisonal file required for uploading app in the app store)
After Selecting above, click continue.
Choose your Appid (i.e. Bundle id) from the list and click continue.
After registering, download the provisional profile (File with extension name.mobileprovision will get downloaded) and double click the file to the Xcode project to include the provisional certificate to be added.
you need to follow below steps
go to developer account
make provisioning profile for bundle identifier that you are using
Adhoc(test) or Distribution(production)
enable push notification
download the certificate
click on the certificate
I need to replace a deployed iOS native app with a new Ionic3 / Cordova hybrid app. The new hybrid app builds successfully (on macOS Sierra 10.12.6) but I can't sign the app (so that it can be uploaded to the app store).
As a first step, I'm focused on getting the new app on the app store (as alpha to test with TestFlight). I've removed all "development" certificates/profiles from developer.apple.com.
There's a lot of information/questions/answers on the web about signing apps. I've spent a couple of days on this issue and cannot get it to work no matter what I read or what I try.
The current iOS app code (deployed)
In Info.plist, $(PRODUCT_BUNDLE_IDENTIFIER)
In /bbh.xcodeproj/project.pbxproj, PRODUCT_BUNDLE_IDENTIFIER = "NSP.BBH-Mobile";
Re-create development provision
Open Keychain. Delete all developer/iPhone certificates. Delete all keys.
On developer.apple.com, delete development certificate and development provisioning profiles.
Confirm my iPhone device is registered with the correct UDID.
In Keychain, generate a certificate signing request file.
In developer.apple.com, create a development certificate, upload the certificate signing request generated in the previous step, download the certificate .cer file.
Double click on the .cer file. Keychain opens. Choose to add to "log in".
In Keychain > certificates, choose export, specify the strong password. Certificates.p12 file will be generated.
In developer.apple.com, create a development provisioning profile. Choose "iOS App Development". Choose an App ID ... but which one?
App IDs in developer.apple.com
BBH Mobile = com.bbh.*
BBH Mobile = NSP.BBH-Mobile
Xcode iOS Wildcard App ID = *
Notice on-screen reads:
"If you plan to use services such as Game Center, In-App Purchase, and Push Notifications, or want a Bundle ID unique to a single app, use an explicit App ID.
If you want to create one provisioning profile for multiple apps or don't need a specific Bundle ID, select a wildcard App ID. Wildcard App IDs use an asterisk (*) as the last digit in the Bundle ID field.
Please note that iOS App IDs and Mac App IDs cannot be used interchangeably."
We need push notifications so choose an explicit App ID = AYW4J8P7X3.NSP.BBH-Mobile
app id = team id (generated by apple) + bundle id (supplied by the user)
It makes sense to choose this App ID which includes the bundle id of the iOS currently deployed.
https://www.screencast.com/t/C0QdPdxwh09t
Choose a development certificate (just created), choose all devices.
Download the development profile and double click to install (in Xcode).
Double-clicking doesn't seem to do anything? How do I know it's installed in Xcode correctly?
Do I need the .mobileprovision file on my iPhone? The mac server is in the cloud so I don't have my iPhone connected via USB to the mac.
Open Xcode. Confirm my apple account added in Xcode > Preferences > Accounts. In the project, targets, signing, click "Automatically manage to sign".
Choose my personal team. The following errors are displayed:
Error 1: The app ID "NSP.BBH-Mobile" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
Why does it prompt to change bundle id? Isn't it standard to have one app id and to generate both a debug/development and release?
Error 2: No profiles for 'NSP.BBH-Mobile' were found Xcode couldn't find any iOS App Development provisioning profiles matching 'NSP.BBH-Mobile'.
But we just created a new development provision and selected App ID = NSP.BBH-Mobile. Why doesn't Xcode recognize this?
you may try unselect Automatically manage signing and import provisioning profile manually.
These are the steps I took to finally resolve this issue. It may not be optimal but it at least worked.
1. In Xcode, turn off automatically manage signing.
2. For signing (debug), select my development provision profile.
3. For signing (release), create a production provision profile, then select the new production profile.
Notes/Observations:
Even though I only wanted to create a signed debug for testing it seems I still had to provide valid signed release provision too.
Even after deleting all keys/certificates etc. and starting from scratch it seems Xcode has created a certificate too. Annoying - it's difficult to tell who created what now.
There was no need to change the bundle ID from the original iOS native app being replaced.
Creating a new production provision did not affect the existing production provision (which I could not use because I don't have the key).
I have followed a tutorial to enable Push Notifications on the App. It's still in development phase and internal testing only.
Using that, I have correctly enable development push notifications on the App ID, and the development provisioning profile accordingly. So much that the first three or so bundles that I have uploaded worked correctly and the Push Notifications went just fine.
Now, with the last update I've done, I've received an Email with an issue and the Push Notifications stopped working:
"Missing Push Notification Entitlement - Your app appears to include API used to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement... etc."
What I realized since then is that when I run "archive" to build the app, after I choose the team (the only one I have and always have used), when I come to chose the Binary and Entitlements, the Provisioning Profile is a DISTRIBUTION one and not the development one I have created.
I've tried countless things from my search on the internet. Including forcing in Code Signing on my target Build Settings the iPhone Developer:MyName and the development profile I've created in the Provisioning Profile row (wich is available to select here).
Still, no-go. I have no idea what changed in the process since I didn't mess with certificates or changed anything in that field, just plain app code.
Thanks for the input.
EDIT: I'll add some screenshots that maybe can shine some light.
The XC:profile is the default distribution provisioning profile that XCode is creating.
Note : without knowing the root cause i can only help you confirm whether you have all the certificates on proper place and using correct one.
Please go this way..
Just check in your Keychain and developer.apple account, if developer certificate is valid, if yes then
Check Provisioning profiles for Development and Distribution with Notification service enable in Provisioning section on developer.apple account.
So far everything is proper then.
Go to Xcode -> Preferences -> account -> refresh all certificate for the same apple account. and hit download.
Now go to Project settings -> general -> confirm you should have selected appropriate team.
finally to to project settings -> build settings -> search "code signing"
now select correct Provisioning profile and developer here.
please let me know if you find any trouble in this.
In my case, I had changed the bundle identifier for the app, but the App ID listed on the provisioning profile was still wrong. Turns out that in the "Packaging" section under build settings, there's another place where the bundle id needs to be changed ("Product Bundle Identifier"), and that's what the code sign-y thing was looking at.
Using Local Signing assets while exporting solved the issue for me
I'm having trouble with the process. I have got push notifications working for Development. I have read multiple guides and questions, and for some reason - either their guides are deprecated in iOS 8 or my Xcode is bugged - I am having issues with provisioning profiles.
For the purposes of this question, I have generalized most of the terms for privacy concerns.
I'm currently greeted with the bug - Failed to code sign "App". There is a Fix Issue button, but I made sure I did not click that; I'm afraid it'll only complicate my problems.
I've followed the Parse iOS Notifications Guide and configured my app according to the guide. I've done the following:
Requested a certificateSigningRequest from Keychain Access
Created a new App ID in iTunes Connect, with a new bundle identifier. I made sure I went into my info.plist in my app to change and match the new App ID created in iTunes Connect.
Using the new App ID in iTunes Connect, I created the Production SSL Certificate.
Installed it to my KeyChain Access, and exported it to upload to Parse.
Next, I deal with the Provision profile. Once again, I went in iTunes Connect, created a new provisioning profile, made sure to link the correct bundle ID with it, and downloaded it.
Here comes the part that may have fudged up the process. In the Parse Notifications Guide, they instructed users to double click the downloaded file - in my case, it was called "AdHocDistribution.mobileprovisioning", which will install itself into Xcode.
Download the generated provisioning profile from the next screen by selecting the "Download" button.
Install the profile by double-clicking on the downloaded file.
This should open Xcode's Organizer in the Devices pane. Your new provisioning profile should appear in the Provisioning Profiles section of your Library. Make sure that the status for this profile is "Valid profile". If the profile is invalid, make sure that your developer certificate is installed in your Keychain.
Double clicking the mobileprovisioning file did not lead to any discernable feedback telling me that it was installed.
Finally, I modified the code signing fields in my project and target's build settings to match the one I downloaded.
Finally, I try running the app, and the error popped up. Please help!
Create a provisioning profile of the application using ADHOC from dev account.Download and control drag it to Xcode, Under provisioning profile in your screenshot select that.
Do the same for Target and project and you will be good to go!
P.S. also select the Team as your dev account
Please follow the following steps..
Check all your targets's Code signing Section. Like Project and Test Target.
Check the project "identifier" in all your .Plist file.
Add the account in Xcode Account section, by choose from :
XCode-> Preference - > Account -> click on +sign and add your apple developer account.
Hope it will help you.
I am developing an app with iCloud enabled. While uploading the app to apple I got following error:
Invalid Code Signing Entitlements. Your application bundle's
signature contains code signing entitlements that are not supported by iOS.
Specifically, key
`'com.apple.developer.icloud-container-identifiers' in Payload ------- not supported`
While surfing i also got some answer that disable iCloud,but I want to use iCloud feature for my app, so is there any other way to overcome this problem, please let me know.
Thanks in advance
It seems like your provisioning profile is not configured to allow iCloud entitlements. To do this, log into your dev account at http://developer.apple.com, go to the iOS Dev center, and Click the link on the right for "Certificates, Identifiers, & Profiles" under the iOS Developer Program on the right. Find your app id in the Identifiers section, and click the edit button. From there, make sure iCloud is enabled for both development and distribution.
Also, make sure your app id prefix is not using wildcards. You will not be able to use a wildcard prefix (com.example.*) when using any of the special entitlements, like iCloud, Push Notifications, etc. Once you are sure that is set up with iCloud enabled, you will need to regenerate your provisioning profile.
Click the Provisioning Profiles on the left, and find you app store provisioning profile. Click the Edit button on the profile, select the app ID that now has iCloud enabled, and click the "Generate" button to generate a new provisioning profile. Then download the provisioning profile and install it over top of the old profile. Then re-build and sign the app and try re-submitting.
Another solution relevant to people re-signing their app:
If you have iCloud features enabled the provisioning profile will contain keys like com.apple.developer.icloud-container-identifiers. If you don't filter these keys out before you pass them to codesign they will end up inside the binary, which causes this error.