Sti
Sti

Reputation: 8503

Provisioning Profiles, certificates and such

I'm trying to understand the whole provisioning-proccess, but I just don't get it..

I have tried to read up, but it's too weird and difficult for me to understand, especially when English is neither my primary or secondary language..

I have been developing for a while, and I remember stressing alot when setting up my iphone for development the first time. When I go into Settings->General on my phone I have 17 profiles, but at least I got it working in the end.

Now, I'm porting my app to iPad, and I'm trying to add my iPad to the table. This is what I did: I went to developer.apple.com, added my udid in devices, I then went to provisioning on the same webpage, and saw three profiles, one uneditable(controlled by xcode), one connected to my app's AppID, and one connected to myself as an AppID.

I added my new iPad-device to all three of them to be sure, and downloaded them again. I dragged the .mobileprovisions to iTunes and to Xcode, and I went into organizer and clicked Refresh to update them. I clicked Use for development on my iPad, and it says it contains those profiles. They're also in Settings->General on my iPad.

In my XCode project, I go under Targets->Build Settings->Code Signing, and set one of my new profiles to Debug, and one of the other to Any iOS Sdk inside it. I've tried multiple combinations. I also went to Project->Build Settings->Code Signing and did the same thing.

When I run my app on my device, it pops up two of the same error message saying A valid provisioning profile for this executable was not found.

When I now connect my iPhone, which has been working perfectly fine all along, the exact same thing happens. Two of the same error message.

The question:

Which profiles goes where? What is the difference between the profile containing myself as an AppID and the one containing my actual app's ID as AppID? What is the difference between Target->Build Settings and Project->Build Settings when it comes to Code Signing?

Also, we spent a lot of time making push work, and out app is on AppStore rigth now, so I don't want to start deleting profiles and ID's, cause I think I read somewhere that that could make the notification stop working.

Oh, and I downloaded a new certificate as well at some point, containing the new profiles, and it ended up in keychain named along with 1000 others..

Help :( ?

Sorry for long and extremely boring/noobish question.

Upvotes: 2

Views: 623

Answers (2)

Sti
Sti

Reputation: 8503

The problem was that after we had released our app to the AppStore, we forgot to put the "Edit Scheme->Run" back to Debug from Release. This had no effect on my iPhone because I have added it to the release-provisioning-test thing.

Upvotes: 0

Stavash
Stavash

Reputation: 14314

I think that your code doesn't build because of a certificate issue - like you said at the end of your question - you "downloaded a new certificate at some point containing the profiles..." You need to understand that a certificate does not 'contain' profiles, but profiles are created and signed using a specific certificate. Check that you have the private key of this certificate - if the signing request was not issued by you, it will require someone else exporting this certificate for you from his own keychain. Keep in mind that downloading the certificate available in your developer account will not suffice.

As for everything else:

Which profiles goes where? Make sure you're creating relevant profiles with correct bundle IDs for your apps. Distribution profiles should include AdHoc and AppStore profiles, while Development profiles are, well, for development :)

What is the difference between the profile containing myself as an AppID and the one containing my actual app's ID as AppID? Not sure what you mean here. Myself as an AppID? Each profile is linked to a specific App ID that has a bundle ID - it can be used to compile any app that has this bundle or any sub-domain of it in the info.plist of the project.

What is the difference between Target->Build Settings and Project->Build Settings when it comes to Code Signing? You can think of your Project->Build Settings as the global settings and the Target->Build Settings as the target-specific settings. If XCode can't figure out which profile to use from the target settings, it will go and fetch it from the project settings.

Upvotes: 4

Related Questions