App Distribution Provisioning Profile and Signing Issues - ios

I've been trying to publish my app (on ios for the first time) for a few days now. Every time I try to submit, I usually get an error in the application loader telling me that the provisioning profile doesn't line up with the signing identity. I can't figure this out! Here is what I've done:
created an iOS Distibution signing identity via Xcode account management
created an App ID (wildcard) via apple dev portal
created an app store (distribution) provisioning profile (associated with said App ID and iOS signing ID) and installed it on my mac
Using RoboVM tools, I generate an IPA with said signing identity and distribution provisioning profile. (Because this is a LibGdx game)
created an App in itunes connect (bundle ID being that of the one used for my app ID)
When I try to send to itunes connect via application loader, I get an error reading "The executable must be signed with the certificate that is contained in the provisioning profile." This is driving me insane so I thought I would see if I could find help here. Thanks in advance!
EDIT: Turns out my mac was mixing up delicately named signing identities. I deleted them all and redid the process. works now!

Check the following things:
Do you select the right certificate in the profile?
Do you select the right profile in the Xcode?
Certificate and profile are valid.

Related

Problems with iOS Free Provisioning Profile

I've been using Xcode with a free Apple ID, and signing a App with a free provisioning profile.
However, after I signed the App with another Mac, the certificate on the first Mac I used to sign the App with does not work anymore.
I received this error message when I tried to run it on my iPhone:
Please verify that your device's clock is properly set, and that your signing certificate is not expired. (0xE8008018).
After generating a new certificate via Xcode > Preferences > View Details... > iOS Distribution > Create, I got this error instead:
The identity used to sign the executable is no longer valid.
After deleting the App from my iPhone, I tried to run the App again and received this error message instead. This also caused my phone to freeze for a while:
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /var/mobile/Containers/Bundle/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Test.app/Test
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Test.app/Frameworks/libswiftCore.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Test.app/Frameworks/libswiftCore.dylib'
(lldb)
Update: I'm using Free Provisioning Profile, thus I don't have access to iTunes Connect. I also can't import the certificate from my 2nd Mac as it was it was reset.
Update 2: I've also visited Keychain App and found 2 certificates - one expired and one valid. I deleted the expired one and tried to run the App on my phone again, but the error persists.
Update 3: I've tried to revoke all my certificates in developer.apple.com, but there isn't a certificates management. Only 'Programs & Add-ons' and 'Your Account' sections are available in the nav, which allows me to enrol into Apple Developer Program.
Update 4: I've also restarted my Xcode to no avail.
The main problem is that I'm not sure why I cannot revoke and regenerate a new certificate.
How can I solve this problem?
Generate a New CSR from your Keychain and download new certificate using this CSR. Include this certificate in your provisional profile and download it. Make sure you remove all expired certificates from Keychain. Good luck.
You don't need iTunes Connect to manage your certificates, IDs and provisioning profiles. iTunes Connect is used for managing your app store releases, which as you know you can't do with a free account.
You need to go to developer.apple.com and log in with your free account to the member center. You will be able to see the certificates and provisioning profiles under your developer account.
Since you don't have anything in the store (you can't with a free account), I would go into the developer's member center, revoke and delete any certificates that are out there, and delete all provisioning profiles. Start from scratch and generate a new certificate using a brand new CSR. Then generate a new provisioning profile using the existing app ID and the newly created certificate. Download the profile update your project settings to use the new signing identity and profile, and you're back in business.
Also, this is assuming that you are not sharing this developer account. If you are, doing the above instructions will make it so other developers will not be able to build with the signing identity unless you give them the private key for the certificate.
I managed to fix this problem by renaming the App name, and recompiling the App. I think that by renaming the App, a new certificate is generated, thus it would work.
Even though, it's not really a great solution, but it solved my problem as I wanted to rename the App in the first place.
Thanks everyone for providing answers!
I had to create a new Apple ID and it worked. Not the ideal solution but without access to certificates its the only solution that worked for me.

In House Distribution issue with distribution certificate

My first question here, and I have tried everything and googled like hell and couldn't find an answer to this issue.
So I have a client for whom I have to make an iOS distribution via in House distribution system (they don't want their app on the store but will use it in corporate use with over 20 devices, so the AdHoc UDID system is out of the question).
Now, the client has given me Admin roles on their Enterprise account and I have done the following:
Downloaded the production certificate
Installed the .p12 file from the client on my keychain
Created the app id
Created the provisioning profile and downloaded it too
Now, I do manage to archive the app and install it on my device, but then the app crashes like right after the splash screen. It is to my understanding that there is an issue with the production certificate, and I am clueless. Any help or advice would be greatly appreciated.
An enterprise-signed app won't allow a debug connection. if you want install app in device, you should create archive .ipa and install.
for debug app in device you need to signed app using AdHoc provisional profile of individual developer account.
After some time I have managed to solve this little issue. The main problem was not the .p12 but the bundle ID itself. Since most of the times I was getting an error that the bundle ID was not matched with the provided provisioning profile. So what I did is:
Edited the app id on the Apple Dev Site from an old name, i.e. com.potato.PotatoApp into com.lemon.PotatoApp (the main reason I had to do this is cuz' my default ID is my company's ID, and in this scenario I had to use the client's Apple Dev Account, and thus the ID itself.
Edited the provisioning profile by selecting the newly edited app id, and then changing the name from "PotatoApp" to "PotatoApp inHouse"
Downloaded the newly edited profile.
On the Debug settings, this was the corresponding list:
-Provisioning profile (debug & release): "PotatoApp inHouse"
-Code signing identity (debug & release): "iPhone distribution: Lemon Company Ltd."
Also on the team list changed from "Potato Company Ltd." to "Lemon Company Ltd.", after that a simple Archive and the build was created without any issues.

iPhone code signing key doesn't match provisioning profile "xxxxxxx"

For about 17 weeks I've been building an iOS app using Xamarin Studio. I've added an iPhone to the developer profile and edited the provisioning profile to include this new iPhone, to test and debugg my app (I was running it on my MacBook (but with OSX Mavericks 10.9), and all worked well.
Last week, my supervisor asked me to upload the app to another iPhone, to show a demo of the app to our customers. I added the device in the developer portal, and linked it to the already existing Provisioning Profile. When trying to run the app, I got the error: "No iPhone code signing key matches specified provisioning profile".
A coworker and I have tried to resolve this issue by importing Certificates and Keys from another MacBook, on which the app still ran, onto this MacBook. After that didn't work out, we tried deleting the Certificates and Private Keys in the Keychain on this MacBook and re-importing them from the other MacBook.
We tried to create a new Provisioning Profile and re-link both iPhones, but the error still occurred.
Now, the app won't even sign on the first iPhone I linked to the first Provisioning Profile in the developer portal, nor will it sign using the emulators in Xamarin Studio
What I wanted to ask was what makes this problem occur, and how to fix it. Do we need to create a new certificate and provisioning profile altogether, or is there something we can do to fix this problem without having to create new certificates and provisioning profiles?
I've contacted Apple Support, they redirect me to Xamarin. Xamarin redirects me to Apple Support... I just can't get help from the officials, so I'll try the community.
Any help would be much appreciated.
1.Go to Xcode, create a new project. Select your company name(do not select user), then type in anything you want as your bundle identifier.
2.Go back to Xamarin studio and change the bundle identifier to match the one you just created in Xcode.
3.Update the provisioning profile in options to include the bundle identifier you created in Xcode. Build, then Debug the solution and it should work.
For me the issue was the team identifier contained the only provisions, and the only selection in Xamarin studio were users. I just created a new project in Xcode that pointed to the team provision, then used that new bundle identifier (that was uploaded to the Apple dev site) in Xamarin studio.
I know it's tedious, but I would start over re-creating certificates and profiles.
You could follow this lovely step-by-step guide: Publishing to the App Store
you have assigned wrong developer and with your provisioning profile.
select it right on going into build setting>> code signing and select provisioning profile you create with developer account.

iOS app updated with iCloud passes validation during distribution, but the distribution profile is invalid in the developer portal

I have a strange issue.
I have a distribution certificate for my app in my developer portal with two App IDs (one wildcard and one explicit) and I've had to adjust the app ID to include the iCloud entitlements because I'm working on an update (iOS 7 only) with iCloud support.
I'm now ready to distribute and so I created a new provisioning profile in the developer portal with that certificate. As soon as it's added to Xcode, it shows up as "invalid" in the Developer Portal.
If I archive and validate my app before the app distribution in Xcode, and use my Apple ID and this provisioning profile, it says "it passed without any errors".
I'm extremely nervous about uploading this to Apple because it doesn't make sense to me.
The other provisioning profiles I have in the developer portal are the iOS Team Provisioning Profile (managed by Xcode).
I've got the entitlements in Xcode and my app works in development with iCloud, but I really want to distribute this.
If I add in more distribution profiles, as soon as it's added to Xcode, it shows up as invalid in the developer portal member centre. That's with using the explicit App ID. If I create one using the wildcard ID, it remains active, but I've read on the Apple documentation that for iCloud, you have to use an explicit App ID.
I have managed to solve this, thankfully.
I contacted the Apple Developer Support team by phone with this (without having to create a new support request and have that take a while) and was sent the following link:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW34
The specific header is "Re-Creating Certificates and Updating Related Provisioning Profiles”,
basically went through and revoked all of my certificates in the portal and removed the certificate and private key in the keychain access. From there, I removed all of my provisioning profiles as well.
Within Xcode on the accounts section, I got a popup asking if the development and distribution certificates should be generated. I said YES and it did it. In the developer portal, I now had two certificates. I created a developer profile and tested my app; it worked. I then created a distribution certificate and added it to Xcode. After refreshing the portal, it still showed active. I archived and validated my app, with no issues and then uploaded. The new distribution profile is still active.
This was great and I'm happy to have this resolved.

How to get around "Application failed codesign verification"

I am a contractor, building an app that will be published by another company. I have been using a Development profile to test with my device, and an Ad-hoc Distribution profile to share the app with a group of testers via TestFlight. This all works fine.
I am having trouble submitting the app to Apple. I tried creating an IPA signed with their App Store profile, but they were unable to submit it with Application Loader (this is their usual work flow). They shared their iTunes Connect admin login with me so I could try submitting it from Xcode.
Both approaches give the same error: Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate.
What are my options here? I have tried deleting and remaking the App Store profile.
I figured it out with the help of Apple. I just had to revoke my certificate, issue a new certificate signing request, and recreate all my provisioning profiles. I changed my Apple ID's email address recently, so it was probably related to that.
More details on starting fresh here https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933-CH1-TNTAG6

Resources