Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code Sign Error When Building iPhone Application

Tags:

iphone

I am new to iPhone development. I just registered with Apple for the iPhone Developer Program. When I try to build, I am receiving an error:

Code Sign error: a valid provisioning profile matching the application’s identifier could not be found

I'm not sure what is wrong. I tried browsing the Internet but I get confused. Can anyone help me with what I should do?

like image 565
Apache Avatar asked Aug 13 '09 01:08

Apache


People also ask

What is code signing iOS?

Code Signing is a way for iOS devices to know that the app to be install on the device is from a known source. Just like we sign things in real life for authenticity, code signing is similar: we add our unique signature to our app.

How do I disable code signing during the build process OSX?

How can I do this? in build settings, choose not code sign.

How do I get an Apple code signing certificate?

Generate a Code Signing Certificate manuallyOpen your Keychain Access app on macOS. Select Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority... Fill in the User's Email Address and the Common Name and select Saved to Disk .

What is code sign on Mac?

You use the codesign command to interrogate an app or other signed entity about its signature. To verify the signature on a signed binary, use the -v option with no other options: codesign -v <code-path>


3 Answers

At first it seems a complex process, but it's pretty straightforward when you've been through it a few times.

In a nutshell the process is this:

(I'm assuming you've set up your iPhone/iPod touch as a test device)

Via the iPhone Developer Portal

  1. Create an App ID (give your application a name, this is just for reference on the website and nothing to do with your own build of your application) enter a string to identify it, like com.yourcompany.appname (this is important and should be the same as in your .plist file inside Xcode) Click and Save this

  2. Go to Provisioning There are 2 provisioning profiles you'll need a) development - so you can install your application on a test device (i.e. your iPhone / iPod touch) b) distribution - if you want to sell the application via the App Store

    You can create the profiles by selecting your App ID, created in the previous step, from the drop down list and clicking Save In a few moments (usually, though it can be longer) the certificate is available for download. Download this to your Mac and drop it onto the Xcode icon. Sometimes the development profile doesn't work for me like this and I drop it directly into the Organiser window in Xcode that shows my connected device.

    Besides, if you are in a team account, team admin need to edit Development Provisioning Profiles, and add modify your certificates privilege.

  3. In Xcode inside 'Edit Project Settings' you can select the certificate you wish to code sign with. Usually for debug I sign with the development certificate. Follow the instructions on the apple site and clone the release profile and call it something like release and sign this with your distribution profile. (You won't be able to load the app onto your phone with the distribution profile selected)

  4. Make sure you select the target device as Device and not Simulator when building for the App Store!

Hope that helps, it's from memory so apologies if I've skipped some small steps.

like image 75
FractalDoctor Avatar answered Oct 19 '22 13:10

FractalDoctor


xcode top left corner make sure you're running as "similator" "iphone"

like image 6
Steve Ham Avatar answered Oct 19 '22 14:10

Steve Ham


Did you set up an iPhone provisioning profile for either development, ad hoc distribution, or app store distribution?

If not go to the iPhone developer program portal, which is linked from the developer.apple.com/iphone. Apple has provided a great series of video tutorials.

like image 1
zpesk Avatar answered Oct 19 '22 12:10

zpesk