views:

114

answers:

1

I'm having serious problems getting one of my app's to run on other people's iPhones. Another app of mine works fine, so I suppose I am at some level capable of getting it right.

I've tried a lot of different things based on Googling around, but there's just too many permutations. It's time for me to learn what is actually going on. While I dive into the documentation, I have a few questions that hopefully some people here can clarify for me:

  1. I noticed the I can set the Entitlements and Code signing settings both on the Project (double click on the top item in Groups & File, which has the name of the project) and on the Target (under Targets, double click on your project name). What's the difference between these two? I know that with header paths, one tends to override the other (without warning of course...).

  2. When I choose "Build and Archive" (a really cool feature by the way), it again allows me to code sign. What's the difference here?

  3. Many forums point to a setting in Entitlements.plist called "get-task-allow" (which needs to be set to false). However, when I create an entitlements file in XCode, there is no such line. Does that mean Apple fixed that bug/feature?

  4. What is the difference between "Code signing identify" and "Any iOs device"?

  5. What is the difference in the provisioning portal between "Development" and "Distribution"?

  6. In that same portal, when you create a new profile for distribution, what is the difference between Ad Hoc and App Store? I've heard people say (and I believe I also experienced this in the past) that you can use the App Store profile for Ad Hoc distribution as well (maybe not the other way around). Then again, that might be due to my confusion if XCode uses multiple profiles at the same time, so it's not clear which profile is doing what.

My situation:

I'm using XCode 3.2.4 with SDK 4.1. The app runs fine on my own phone (which actually makes it harder to debug). Errors my friends keep getting vary from "Entitlements are not valid" to 0xE8003FFE and 0x800ccc0e, depending on what I send them. One has an iPhone 3G, the other an iPod touch. Both run iOS 4.1 and are not jail broken. Both do not have "restrictions" turned on.

I have two applications: * com.isimplifiedchinese.teacher * com.isimplifiedchinese.student

I was able to distribute the student application by building for the device and then manually creating the .ipa file (that was before I knew about the Build & Archive feature). I'm not able to distribute it with the Build & Archive feature yet. But I would like to focus on the teacher application, which I'm not able to distribute in any way at all (even though it worked in the past, before I started changing things).

In my provisioning profile I have (for the teacher application): * one certificate for development * one certificate for distribution * a list of devices including my own and those two friends * a provisioning profile for development (with me and my two friends in it) * a provisioning profile for distribution (with me and my two friends in it). It's configured for "App Store" (but I've also tried "Ad Hoc" in the past, albeit possibly with slightly different options elsewhere)

All profiles are still valid. They are all listed in XCode Organiser and seem to be up to date.

Deployment is set to Device 4.1 - Ad hoc. On both the project and the target build settings: * I added "Entitlements.plist" to "Code signing entitlements". * code signing identity is set to automatic selector which points to my iPhone Distribution certificate and the App Store profile for the application. * Any iOS Device is set to my iPhone Developer certificate (it's not set to automatic, because if I do that it points to a provisioning profile of the student application of mine).

When I choose Build and Archive and then Share Application, I set Identity to iPhone Distribution (which matches iPhone Distribution - App Store).

I regularly, but not consistently, used Clean All Targets during my struggles

Another thing that may or may not be relevant: I started with the teacher application and after a while a cloned and renamed the clone to student application. The student application uses shared libraries from the teacher application, but not the other way around.

Needless to say there's just too many permutations here and too much magic (from my point of view). Hopefully you can either help me understand this system better or magically point me in the right direction so I never have to worry about it again.

+1  A: 

Lots of questions indeed... Some answers:

Q4. Code signing identity is the name of the entry, which can include several sub entries: you can sign with a different identity for each possible platform. E.g. you sign with identity X for iOS 3.2 devices and with identity Y for iOS 4 devices.

Q5. Development vs Distribution: when you develop your app, you sign it with your development profile so that authorized devices will accept it, when you're ready to deploy the app, you sign it with your distribution profile, which only the App Store will accept. Apple then applies its own signature on the app so that any device will accept it when it downloads it from the app store.

Q6. App store distribution is for selling your app through Apple's App store, while Ad Hoc distribution is for distributing your app through your "own enterprise app store", your app is not available on the App Store.

Guy
Sjors Provoost
Guy