16

I think my head soon explode. I've been working on my application for some time and finally git an iPhone for testing on device, now I'm trying to run my app on iphone but can't do it. I've done all necessary steps but getting an error [BEROR]Code Sign error: a valid provisioning profile matching the application's Identifier 'com.yourcompany.MyProject' could not be found

My provisionign profile is called XXXXXXXXX.com.myname.*

in info.plist I changed Bundle identifier to com.myname.myapplication

my project name is MyProject because I can't change it, but my target and executables called myapplication

I've checked all setting and can't even find this yourcompany anywhere

but still getting this error

where need I seek?

thank you

Burjua
  • 12,506
  • 27
  • 80
  • 111

3 Answers3

23

Xcode uses the bundle identifier found in the target's Info.plist file for code signing.

Which Info.plist file is selected is actually a build setting (normally in the target), and is usually set up by Xcode correctly. If you manually edited the Info.plist's bundle identifier value to your identifier, Xcode should use this identifier and code signing should work.

The default Info.plist file contains a bundle identifier that contains Xcode build settings and is processed to the final identifier when building the target.

Nikolai Ruhe
  • 81,520
  • 17
  • 180
  • 200
  • Ok, I found in a project folder file MyProject-info.plist which contained wrong data, I changed it and it works now, but I can't see this file in xcode, in xcode I have myapplication-info.plist, I think it's not right, what can I do with it? What does this file do at all? – Burjua Sep 17 '10 at 09:35
12

The answer by Nikolai Ruhe said "If you manually edited the Info.plist's bundle identifier value to your identifier, Xcode should use this identifier and code signing should work." This is true. However, these days (I'm not sure how it was in Sep 2010), xcode uses a default bundle identifier that is a function of the variable ${PRODUCT_NAME}. This same variable is used in various other places, e.g., as bundle name, bundle display name, etc. Thus, I would recommend changing ${PRODUCT_NAME} instead, and this change will then propagate to the Info.plist's bundle identifier, etc.

How to change ${PRODUCT_NAME}? Select the appropriate target, go to "build settings", expand the "packaging" section, and then edit the value of "Product name".

auspicious99
  • 3,902
  • 1
  • 44
  • 58
  • This is not always true. If you release an app, but change the product name later, you still have to use your old bundle identifier. In that case, changing just the bundle identifier is a good idea. – Scott Berrevoets Aug 27 '13 at 12:52
2

Select your target, go to summary. Change bundle identifier to com.myname.myapplication from com.yourcompany.MyProject. It should work! I have been using it like this and it works great everytime. You can do the same from info.plist file as well.

Kunal Khanna
  • 551
  • 6
  • 6