Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
503 views
in Technique[技术] by (71.8m points)

iphone - 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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...