How to build IPA for distribution with TestFlight with XCode 5? - xcode

In XCode 5(.1.1) how to I get an IPA for distribution via TestFlight?
I set the code signing identity and provisioning profiles for the release to my distribution profile
I build the archive (Select iOS Device from the menu, then Product>Archive), which succeeds.
I select the archive in the organizer and click "Distribute..."
I choose "Save for Enterprise or Ad Hoc Deployment
I choose my distribution profile (same as in 1 above)
I click export.
XCode gives an error message
Code signing operation failed
Check that the identity you selected is valid.
What should I do?
Update:
I deleted my certificates, app ids, and provisioning profiles from the apple dev center, and from my keychain access (locally).
I recreated the certificates, app id, and ad hoc provisioning profile.
I synced my info into XCode from the dev center
I updated the code signing identity and provisioning profile build settings for the project and the target to use the new distribution provisioning profile.
I archived the project again.
I clicked distribute in the archive organizer
i chose ad hoc
i chose my new ad hoc distribution profile (from above)
I get the same error
Code signing operation failed
Check that the identity you selected is valid.
(#mohacs suggestion) When I try to validate the archive, I get
No application records were found.
Applications must be ready for upload on iTunes Connect before they can be validated or submitted from within Xcode.
(#threeve suggestion) When I read on Code signing fails for Cordova app (using XCode 5.1.1 and Cordova 3.4.1-0.1.0) to check the (System) Console (thanks #shedd), I am not sure where to look, but under "System Log Queries," I looked in "All Messages," and I see no messages during my attempt to "Distribute".

Thanks to #shedd and #threeve https://stackoverflow.com/a/25212574/1449799 THE ISSUES IS FIXED! Despite being unable to find any error messages in the Console, from www, I removed Gruntfile.js, karma-e2e.conf.js, karma.conf.js, and the entire node_modules directory.

Related

Xcode 8.3.2 signing errors

I have Xcode 8.3.2 on Sierra. I am trying to build an Enterprise .ipa (have Enterprise membership).
I am having issues signing my app. Specifically in Xcode I have the following under General\Signing:
Automatically manage signing is enabled
Team: "My Team (Enterprise)"
Provisioning Profile: Xcode Managed Profile
Signing Certificate: iOS Developer
Status
Failed to create provisioning profile "com.myapp" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
No profiles for 'com.myapp' were found. Xcode couldn't find a provisioning profile matching 'com.myapp'.
My steps were:
Logged into Enterprise account at https://developer.apple.com/account/
Under Certificates, Identifiers, and Profiles I selected the Add
Selected In-House and Ad Hoc
On my MAC in the Keychain Access I selected KeyChain Access\Certificate Assistant\Request a Certificate from a Certificate Authority
Saved to my desktop
In https://developer.apple.com/account/ I uploaded the certificate signing request
I see it as a certificate as type iOS Distribution with and expiration date
I download the .cer file and double click on it to install it
Within Xcode\Preferences I find the Team under the Apple ID and under Manage Certificates I see iOS Distribution Certificates and Enterprise with today's date
I select the Download All Profiles for that team
In Xcode I select General\Signing and "My Team (Enterprise)
At this point I get the two errors described above.
I am new to Xcode development so I am sure there is something wrong with my steps.
Any insight would be greatly appreciated.
Well the solution to my issue was to do the following:
In Xcode under the "General" tab to disable Automatically manage signing
At https://developer.apple.com/account in my enterprise account under provisioning profiles I created a new distribution profile
Downloaded the profile => .mobileprovision file
Double clicked on the .mobileprovision file
With Automatically manage signing disabled I then selected the Provisioning Profile I just created and downloaded in the drop downs for Signing (Debug) and Signing (Release)
At this point I was able to archive and export an enterprise .ipa
This is the solution to my issue that's similar to this one:
Change your bundle identifier to a unique string to try again.
Your bundle identifier is already in use by other developers I guess, so just change your bundle identifier in the Identify tab right above your Signing tab to another one:
For example:
Bundle Identifier: org.react.native.example.RamenForLifeIn2022
Hope this helps :)

Xamarin No installed provisioning profiles match the installed iOS code signing keys

I am trying to run my app locally and not through an emulator.
These are the following things that I have done:
set up the free provisioning profile
"trusted" my iPhone when prompted
Enabled these settings for provisioning profile:
However, I am still getting this error when trying to run the app locally on an iPhone
No installed provisioning profiles match the installed iOS code
signing keys
What else can be done to run my app locally?
Log into the Apple Developer member center and review your certificates. Down to the left you should see the Provisioning Profiles title. Click it and you'll find a list of the profiles you have. Now you need to create one with the same app identifier that your app has in Xamarin (you find it in the Info.plist file).
After that you need to open XCode and download it through Xcode -> Preferences -> Accounts.
Clean, rebuild and debug Xamarin project and try again.
Go to xcode/preference/ account add a apple ID if you don have any...if you have double click in the name ...and look the name appear in iOS Team Provisioning Profile.
Now open in xamarin the info.plist and in Bundle Identifier put this name.
and now should load a provisional profile.

Receiving Error on Xcode: "An administrator must request identities before they can be downloaded."

So I am using Xcode 5 to publish my first app on the App Store, but for some reason it is saying that I must request identities before they can be downloaded. Well, I am the administrator and I searched online for 3 hours looking for a solution. I did possibly EVERYTHING on Google, Youtube, and even StackOverflow. I am just hoping now that I will get a renewed answer.
Try following these instructions. You need to generate a Distribution Certificate, use that certificate to create an Ad Hoc or Distribution Provisioning Profile, download and import that profile into Xcode, Archive your app, and validate it.
https://developer.apple.com/library/IOs/documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40012582-CH1-SW1
http://anthonytietjen.blogspot.com/2012/08/overcoming-trouble-validating-your.html
Also, go into Build Settings for your project and go to Code Signing. Make sure the Code Signing Identities are all set to the iDevice Distribution App ID you created in iTunes Connect as well as the Provisioning Profile set to the Provisioning Profile you painstakingly created in the iOS Development Center as well (that Ad Hoc provisioning profile file you created and downloaded into Xcode.)
I would say that if you still can't get it working with an Ad Hoc provisioning profile, try generating an App Store Distribution Provisioning Profile within the "Certificates, Identifiers, and Profiles" portion of the Development center , import it into Xcode (by refreshing the provisioning profile list under Xcode->preferences->accounts->details->refresh button) and go through the validation process of your archive again. I'm not sure if it's because Xcode can't validate an Archive with an Ad Hoc profile or what, but it seems to pick up the Distribution Provisioning Profile just fine and allows you to validate. Don't worry, even if you don't validate the archive with the Ad Hoc provisioning profile, you can still create the .ipa for your archive by hitting the Distribute button in Organizer->Archives and choosing the Ad Hoc profile so that you can beta test it.
Also one other reason for this which I faced was that I had renamed the project since I first started it. The CFBundleIdentifier was set to com.ABC.${PRODUCT_NAME:rfc1034identifier}. Turns out that the ${..} was evaluating to not my current project(renamed) name when I was trying to validate gave the the same No identities… message. Changed this entry to com.ABC.my-new-project. Rebuilt the archive which now I could validate.
So watch out for project renames.

xcode connecting distribution provisioning profile to development certificate

Im using xcode and I want to upload my app. In order to upload I need to build my app with the distribution provisioning profile. I have a valid distribution provisioning profile but when i try to build xcode gives my this error:
Code Sign error: The default keychain doesn't have an identity matching the profile 'Dodge Cars Free Distribution1' and identity 'iPhone Developer: Rajeev Arora (4DL7HDW3F2)'
What i understand is this means xcode is trying to check the validity of my distribution provisioning profile with a development certificate. Obviously this wouldn't work. How can i get xcode to recognize that my provisioning profile is for distribution? I've tried making a new distribution profile with no results.
EDIT
I found a solution I guess. I tried building with one of my old provisioning profiles and it worked
If I can remember correctly, these are the steps needed to be done to use the Distribution provisioning profile:
Import the Distribution certificate into Keychain Access
Dragged the Distribution Provisioning Profile into the Xcode icon on your Dock
Set in Build Settings to use iPhone Distribution in the Code Signing section/field
Edit from comments: You should not press the Run button, as it will always give an error. You should click Product > Archive from the menu. The archive of your project should show up in the Organizer window > Archives tab. From there, you should be able to Submit your app.

Application failed codesign verification during validation in Xcode 4.2

I am experiencing trouble with the distribution provisioning profile.
I have tried for many times to create a distribution provisioning profile using the instruction: http://developer.apple.com/ios/manage/distribution/index.action
But when I verificate the program I get an error:
Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate.
I have done the steps as follows:
1.I have created certificates in key chain access.
2.I have created provisioning profiles in iOS Provisioning Portal
3.I have created an application ID
4.I have set provisioning profiles in the Code Signing section in Xcode
Besides, I have checked that there are no duplicate or out dated certificates in key chain access.
I have looked through stackoverflow and have not found a solution.
What can be the problem?
Please check if you have done this:
1) one Development Certificate in the iOS Provisioning Portal
2) downloaded the Development Certificate onto your Mac and installed it in on your Mac (open it, after download it, so the keychain will open and you see the Development Certificate
3) Check if in the iOS Provisioning Portal exists a Provisioning Development Provile, signed with the Certificate you added in step 2(above) in the Keychain).
4) Have you used a wilcard for the AppId, or added you a String? Under Provisioning Profiles under the row App Id there is a String like this: **********.text. If you have something like this CD8V98ZN8M.* (first characters bevore the . are different, but the star after the point is important, then you can sign with this Provisioning profile every app. If there is something like this: CD8V98ZN8M.appname, then your Bundlename set up in your Target in xcode must be exacrly appname.
5) did you download the Provisioning Profile and installed it in Xcode by moving the provisioning Profile onto the Icon?
6) Try to rebuild after made a Clean, if it still fails check the Code signing Identity under Bild Settings in your Application Target in xcode, what and select your Development provisioning Profile and then make a Clean and try to rebuild.
But also check out this Question: How to solve "Application failed codesign verification" when uploading to iTunes Connect?
I solved my own problem. One old version of XCode 4.2 has a bug with codesign verification, so i've just updated XCode 4.2 to newest version and my app succeeded verification. Thats it! Always check for updates! =)

Resources