Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Sign error: a valid provisioning profile matching the application's Identifier ... could not be found

I have been fighting this issue for days now and about to beat my head against the wall and put myself out of my code signing/app submission misery.

I have an application that has been submitted to the app store and accepted no problems (ver 1.0.0). I was able to publish the first update (ver 1.0.1) with a little bit of trial an error using XCode 3.2.4 and iOS 4.1 via Application Loader. Now I am on XCode 3.2.5 and iOS 4.2 and am trying to publish an update (ver 1.0.2) via XCode Organizer.

I can successfully build my application against the AppStore Distribution provision when I set my Bundle Identifier in the info.plist to "com.myCompany.myApp". But when I try to Validate/Submit the build via Organizer I get and error stating "Bundle Identifier: com.myCompany.myApp differs from prior bundle identifier ABC123XYZ1.com.myCompany.myApp". Apparently when I first submitted my app via iTunes connect I used the full (AppId).BundleIdentifer syntax. I have verified this by viewing the Bundle ID in iTunes connect.

So, logically, I added in the AppId prefix to the bundle identifier in the Info.plist file. When I do this and try to build again, I get "Code Sign error: a valid provisioning profile matching the application's Identifier ... could not be found." and the build fails.

I have tried everything I have read everything on the internet regarding these two errors with no resolution to the problem. I am in a catch 22 situation. I can't build the app with the AppID prefix in the bundle identifer and I can't submit it to iTunesConnect without it. Also, the iTunesConnect error occurs when trying to use Application Loader to upload the app.

I am prepared to offer my first born to anyone who can help me get out of this code signing/app submission hell!

like image 353
Mike Murphy Avatar asked Dec 17 '10 14:12

Mike Murphy


2 Answers

So after waiting 2 months for an answer from the iTunes team, which never came, I have figured out a way around this issue and got my app to upload. The key is to make the bundle identifier match the bundle id that is registered in iTunesConnect. In this case the bundle id in iTunesConnect was in the form of 1234567890.com.companyname.appname. Some how when I first created my app I had included the bundle seed id which from my research should not have been included when the app was created in iTunesConnect.

To resolve the issue, I created a new App ID in the provisioning portal in the form of 1234567890.1234567890.com.companyname.appname and then created a new distribution mobile provision based on this new AppID. I downloaded and installed the mobile provision in xCode Organizer. In the info.plist of my xCode project I set the bundle identifier to 1234567890.com.companyname.appname. This allowed xCode to match the mobile provision to the specified bundle identifier in the info.plist and successfully build and sign my app with a bundle identifier that matched the bundle id in iTunesConnect. In organizer I was able to validate and upload the app successfully.

like image 184
Mike Murphy Avatar answered Oct 29 '22 20:10

Mike Murphy


In my case, I had to first BUILD the app with Cmd-B.

This popped up a keychain window access asking me to "Allow" (or "Always Allow") Xcode to access the keychain.

Only THEN could I actually run the program to launch it on my iPhone.

Apparently, hitting only run didn't do the trick.

(Btw, remember to first sign your app with the "iPhone Developer: Your Name ()" key.

like image 40
user2015453 Avatar answered Oct 29 '22 21:10

user2015453