Invalid Code Signing Entitlements, error while submitting app to apple - ios

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.

Related

ERROR ITMS-90046: "Invalid Code Signing Entitlements." using custom applinks

I've tried to upload application to apple store using Application Loader include Associated Domains in application entitlements but I have an error:
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'applinks:http://XXX.internal/' for key 'com.apple.developer.associated-domains' in 'Payload/MyApp.app/MyApp' is not supported."
I use distribution certificate
I have checked to ON in Associated Domains in App Ids in apple developer
I have created provisioning profile using app ids (with enabled Associated Domains) and distribution certificate
What can be the problem? I've tried recreate of all certificates, provisioning profiles etc.
I have solved this issue.
My problem was that I wrote wrong domain name. I had before:
applinks: http://something.com
and now I have:
applinks:something.com
And it's working great.
Go to xcode preferences.Accounts. Select your developer account and double click on the team name in the right. You will see all the provisioning profiles there, select anyone and show in finder. Now delete all these files and move to trash.
Now delete your account from the xocde. Quit xcode.
Now reopen xcode and go to preferences and add your developer account. Download all profiles from here.
Now re-try to build. Let me know if it works.
For anyone else stumbling across this, the problem is actually in your app ID so just deleting your provisioning profiles won't solve anything. Here's how to fix it:
1. Login into your apple developer account
2. Choose certificates and provisioning
3. Click on App ID
4. Click on the edit button for that App ID
5. Turn off Associated Domains
6. Save
This will invalidate your existing provisioning profiles so click over to Provisioning Profiles and you'll see the little icons showing the old ones are now invalid. Delete those. Generate new ones, download those and rebuild your app.
Problem solved.
I had the same problem when check
app id Push Notifications Disabled and project ON Notifications Im off Notifcation The problem was solved
Turning Associated Domains in capabilities off and then back on solved it for me.

Certificates and Provisioning Profiles for Push Notifications

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.

Wrong/AutoGenerated Provisioning Profile when Submitting Build to App Store

I am attempting to upload my iOS app build. After clicking submit from the Organizer-Archives window in Xcode, it seems to select the wrong Provisioning profile to submit. It is also not editable.
I have the correct iPhone Distribution signing identities, and App Store provisioning profile in both the project and target (under Build Settings).
I'm skeptical about submitting the app with this auto-selected Provisioning Profile ("XC: Rajib.Tho") instead of "My Parse Push App Store Profile." Am I doing something wrong here? My app uses push notifications so I want to make sure the provisioning profile is set up correctly before submitting.
Screenshot here of what I see:
I solved this by deleting the provisioning profile that Xcode was auto generating from Apple's developer portal. It appears that it was pulling it from there, and once I deleted it from there and archived and submitted it, it pulled the correct provisioning profile that I intended to use!
I'm not sure how Xcode chose another provisioning profile, when you explicitly selected another.
If I were you I would find and delete the "XC: Rajib" provisioning profile and start over (restarting Xcode in the process).
I guess you could give Xcode the benefit of the doubt, by turning down the Binary and Entitlements triangle and carefully checking the entitlements then submitting if they're right... but I wouldn't feel good about it.

Need to force Xcode 5 to not use wildcard provisioning profile

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.

Code Signing Error

The company I am working for has a base app that they reskin and sell to different businesses. I have redesigned the app and am trying to upload it to their account but am getting:
[BEROR]Code Sign error: The identity 'iPhone Distribution' doesn't match any
valid certificate/private key pair in the default keychain
How do I add their developer account into my Xcode and acquire a certificate for distribution?
Thank you
Basically, you need to have maximum privileges in the Provisioning Portal to do the following, so if you don't, get it, and then do this:
Login and download a developer certificate. If you need to create one, select How To from the menu in the Provisioning Portal under certificates.
Download a distribution certificate. Again, if you need one, select How To.
Open both certificates and make sure they open in your Keychain Access
Select provisioning and download both a developer and distribution .mobileprovision provisioning profile. Create one if necessary using How To
Make sure you have XCode open and open both .mobileprovisioning profiles. Make sure that they open in the Organizer and show in the status that they are properly linked with a certificate that is valid in the Keychain Access. If they aren't, a flag will pop up, saying something like "There is no valid certificate associated with this profile" in bright red.
Check your code signing in both the Target and Project areas of your build. Make absolutely sure that both are trying to sign using your distribution profile.
Make sure that you are building the distribution scheme of your app (You may have to create this).
Finally set the build device to iOS Device, set the scheme to Distribution, and select Archive. It is imperative that when the program asks you to allow the code signing to use your private key, that you select "Allow" and not "Always Allow," as this is very buggy and often results in code signing errors.
If you need any more help, comment.
Hope this helps!

Resources