lostInTransit
lostInTransit

Reputation: 70997

Cannot run code on device

I have some source code which I had developed and later gave to another team. They signed it with their certificate and provisioning profile.

Now I have the code back and have set the appropriate values in the project properties for code signing identity (with my cert and profile). But when I run the application on a device, I get an error showing the other team's certificate and prompting that the provisioning profile does not exist.

I don't know where it is being referenced.

Can someone please help.

Thanks.

Upvotes: 3

Views: 12748

Answers (6)

vika123
vika123

Reputation: 11

Change the Active SDK from iphone device to Iphone simulator. This will let you test your code on your iphone simulator. You need a cert if you plan on running your app on your device. (Maybe the code that you got was signed for device).

Upvotes: 1

Justicle
Justicle

Reputation: 15173

Similar thing just happened to me, in my case the "Target" settings were still set to the previous developer's certificate, while my "Project" settings were set to my new certificate. Xcode reported:

"Code Sign error: The identity 'iPhone Developer: ' doesn't match any valid certificate/private key pair in the login keychain"

Boot's answer worked for me - there are "Target" settings for signing that override the "Project" settings, which is why you may have needed to recreate the whole project, if you only changed the "Project" settings.

Upvotes: 2

Chris Lundie
Chris Lundie

Reputation: 6023

Check the Target properties, not just the Project, because it could be overridden there.

Upvotes: 3

Raj
Raj

Reputation: 6830

connect your iphone, open organizer, there you first need to delete the profile of your other team, and then force an add of your profile (by drag and drop or clicking the + button)

once done, change your code signing settings from the project info window and you should be okay. i faced the same problem and had to do the above to resolve it

Upvotes: 0

Alex Reynolds
Alex Reynolds

Reputation: 96947

Under Project > Edit Project Settings... click on the Configurations menu and select All Configurations. Then scroll down to Code Signing (or type it into the search field) to verify your provisioning information, changing the Code Signing Identity as needed.

Upvotes: 0

Related Questions