Signing iOS xcarchive with a new provisions - ios

I have an xcarchive file that some changes made to him and I want to sign it for distribution. (It already was signed with our certificates)
When I first tried it after downloading all certificates and provision from Apple I got an error :
Xcode attempted to locate or generate matching signing assets and
failed to do so because of the following issues: Your account already
has a valid iOS Distribution certificate........ You can also revoke
the current certificate and request one again.
In my member center I had 2 provisions for Enterprise, I revoked the last one and generated new one.
Now I getting a new message :
No matching provisioning found for "Applicataions/myAppName.app None
of the valid provisioning profiles allowed the specified entitlements:
application-identifier, beta-report-active, keyachain-access-groups.
The selected team "my team..." is different from the team "6hjfhGHR44"
originally to build this item.
How to fix this problem?

Related

ios development/distribution certificate - missing private key

I accidentally deleted private keys and my iOS certificates from the keychain Access.
So i revoked my certificates from the iOS member center and creates new ones (with new CSR) plus new provisioning profile for my app and downloaded them.
in Xcode when i try to sign the app with the new provisioning profile its marked as ineligible and my new certificate is missing private key.
Any idea to fix this problem can i match a private key manually ?
I probably screwed up the Keychain Access on my MacBook when I accidentally deleted some of the items from there. I was not able to create the archive (.ipa) for ad-hoc distribution purpose because the certificates were not error-free (were not trusted, in red text). I repeated the steps without success - such as clicking "Request a Certificate from Certificate Authority" and creating new development and distribution certificates/profiles, deleting files from /Library/MobileDevice/Provisioning Profiles folder, /Users/owner/Library/Developer/Xcode/DerivedData folder.
I then -
(1) deleted all the keys and certificates that I had created before,
(2) downloaded the "Intermediate Signing Certificate" by clicking the link (see below), and double clicked this certificate to install it on the login keychain,
(3) I then followed the normal steps (i.e. clicking "Request a Certificate from Certificate Authority", then using this to create new development and distribution certificates, and then corresponding provisional profiles from my developer portal).
Now the certificates are free from errors (now have green check marks on the Keychain). I can now successfully make the archive (.ipa file) for distribution. Hope this helps.
P.S. My desktop Mac was fine all along, only my MacBook was screwed up.
P.S. Do not worry about the yellow warning signs on com.apple.kerberos.kdc and com.apple.systemdefault certificates found in the System keychain that said "This certificate has not been verified by a third party."

No code signing identities found

When I try to create a new Xcode project named Twitter Searches I get the following error. However if I use a different name I am able to build the project with no errors. What does this mean?
No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found
You have to log into developer.apple.com and register an app identifier and create a Certificate for it, then create and download a Development provisioning profile. The bundle identifier of the app has to match between your Developer account and Xcode.
if you want to run on real device(iPhone,iPad),you need certificate and provisioning profile,if you don't have them you can run on simulator. to get these certificate and provision profile you have to buy member ship program from https://developer.apple.com
to know more about this follow the link How to enrol IOS developer account
Edit :
Now with the new xcode 7 we can run our app on our device freely without any certificates and provisioning profiles.

Provisioning Profile ERROR while running in iPad

I am using Xcode 4.6.3.
I am getting this error messages while running the application in iPad,But first it was running correctly. Now we have renewed our license so i have changed certificate and
profile.still the same error appears
Please help me...
you need to follow this step:-
You Provisioning profile Generate with developer certificate from iTunes dev center.
remove old install App from device may be you Ipad contain old profile reference.
After connect your device to Xcode-Organizer->device->yuorIpad->Provisioning--check there old Provisioning profile is ther or not. if there then remove it.
In your target And Project check-> your Identifier is currect or not for example com.yourprofile.yourId
In Build setting you->code signing ->selection profile is correct identifier or not
Now just clean your Project. Build and run.
EDIT
Do not forget to Adding New testing Device ID into your new Generate Provisioning profile. in iTunes Dev there is Column to adding Device and also asking Device while you Generate Provisioning profile. May be you forget this step.
be sure that you are generating provisioning profile after adding device, or when you're just renewing profile.
And your provisioning profile must be linked with certificate, that you have in keychain.
(certificate+key)
All devices must be readded on demand, after renewing dev program (!)
In general, It's pretty sraightforward (just try it from the clean sheet, delete all the old stuff)
1) cert signing request
2) appid (if new app, if old just skip, optional - apns stuff)
3) certificates dev/distr (import them)
4) devices
5) provisioning profiles (import them)
in xcode choose in all positions needed profile, sometimes choosing parent option do not change profile for all fields of "Signing Identity" in xcode.
Deleting of old provisioning profiles is optional, it's not a problem when you have many of them
it's only problem when signing identities are more then one, ie: old expired and new one.
(In xcode 5 it will be easier to choose identity)
EDIT: it really seems like in build settings in code signing identity select options (some option) an old profile is chosen, and xcode gives this error.

Valid provisioning profile not found but has matches

I just added a new device to the provisioning portal, generated certificate, mobileprovision, etc. My keychain has the certificate in it, my device has the app's profile on it, and there's a green checkmark underneath Status. In the build status tab of the project underneath Code Signing Identity both Debug and Release say "currently matches [my information]". However, when I try to run the app on my phone I get "A valid provisioning profile for this executable was not found."
Extra information that may or may not be relevant: The app was running in the simulator but when I tried to build it for the iPhone I got the Mach-O linker problem with armv7 architecture because I hadn't linked the necessary frameworks. So I created a new target and added the appropriate files. This target does say that my Code Signing Identity matches, and it's where I got the bundle identifier to generate the provisioning.
I have tried cleaning and building again.
Possible solutions:
Sometimes there may be two different provisioning profiles with same names in Xcode for different AppIDs. Windows/Organizer(Shift+Cmd+2)/Library/Provisioning Profiles/. Check if you use the correct one.
In Apple Developer Portal and Organizer check, if your provisioning profile is not expired.
Check, if the provisioning profile has proper AppID or WildCard AppID. Check if it matches to the Bundle ID in Info-Plist of your project. Check also Device IDs.
Did you use the same Mac before? The certificate, that is used in Provisioning Profile creation is bound to the Mac. Try to completely recreate it on your Mac or get a key file from other Mac for that certificate.
I ended up deleting all of the provisioning profiles and certificates on my computer, invalidating my cert on apple, and then requesting and creating a new one. Now everything works.

Unable to Download Application, Application could not be installed at this time

I have problem doing OTA installation for my iPad application. I updated my enterprise certificate last week. and i created new dev/dist certificate and provisioning profile. Xcode organizer shows the correct expire date. when i try to install the app from the link , it downloads half and shows me the error "Unable to donwload Application, could not be installed at this time." I've done OTA installation like more than 50 times before. I rechecked everything. It's not problem of invalid link, or selecting wrong provisioning profile. Any help will be greatly appreciated.
I checked the device log and it says:
May 1 13:15:32 unknown installd[2455] <Error>: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
May 1 13:15:32 unknown installd[2455] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
May 1 13:15:32 unknown installd[2455] <Error>: 00381000 verify_signer_identity: Could not copy validate signature: -402620394
May 1 13:15:32 unknown installd[2455] <Error>: 00381000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.8zrx0B/foo_extracted/Payload/Hra.app
This answer helped me, thank you very much.
Here are my exact steps. I was building an ad hoc from an Xcode project created for me, so the bundle identifier was already created and I had to match it in the steps below.
In your Apple Developer portal:
need to create new certificates first: Distribution Certificate, then toggle to make sure it's reflected in the Developer Certificate. I downloaded both certificates to my computer just out of habit, but Xcode 4.3.2 doesn't require that Keychain Access request step anymore.
Create App ID (make sure it matches the com. bundle created in XCode if that's already been created. In this case the Info file listed the bundle identifier as a wildcard: com.mydomain.${PRODUCT_NAME}. The name of my product has upper and lower case. The App ID is case sensitive so it should match this Xcode bundle identifier/product name exactly.
add any new devices.
Create Development and Distribution Provisioning files - download, and drag each into Xcode.
In XCode:
in Build info file, it worked for me that Code Signing Entity fields were all set to Don't Code Sign
to create archive, clean Target, then making sure the scheme points to a connected device, go to Product -> Archive
the Organizer view of Archives should come up - select the one just built, select Distribute then select Save for Enterprise or Ad Hoc and in the Choose an Identity to Sign With choose Refresh in the drop down, then just leave it on the default and click Next.
Choose Save For Enterprise Distribution - you only need to fill out the top two fields; the url on the server to the .ipa file, and the name of the app.
then upload the files to the directory specified in the last step, customize and send out the link i.e. itms-services://?action=download-manifest&url=http://yourdomain.com/yourdirectories/yourAppName.plist
The solution is to create the distribution certificate from the team agent when u renew the certificate. –

Resources