How is application ID used by Xcode when building/signing the application? - iphone

iOS Provisioning files make reference to the Apple application ID (of the form "A1A2A3A4A5"). Most often, the DNS form of the application is replaced with a star (*).
My understanding is that the provisioning profile is stored in the iOS development device and is not used by Xcode. Thus, when building/signing the application, how can Xcode include the app ID into the executable file ? The only information Xcode has is the "Bundle Identifier", which is of the form "com.mycompany.myapp" - but there is no App ID, thus there is no way to add the app ID at this stage.
Does anyone know how this works. I feel that many people use those tools (as I do) without really knowing how it's made inside.
Many Regards,
Apple92

An iPhone application is not just an executable, it's a bundle (like a directory) that contains the executable, but also resources (like nibs or images) and in particular contains a small plist manifest file with details about your application - including the application ID. The provisioning profile is also included in this application bundle.
A device also maintains a list of provisioning profiles it has installed, but the profiles can be in the application as well and are checked against the application plist file to make sure everything matches.

For anyone who may stumble upon this question, I give a lot of detailed context in my answer to this related question.
https://stackoverflow.com/a/20557213/117471
Basically it boils down to this:
A Bundle ID is a string that is defined in Xcode
An App ID is an object that lives in Developer Member Center. It is often confused with Bundle ID because the App ID Suffix parameter of the object (I'm trying to drive home the fact that App ID is not a string. Is it working?) matches the Bundle ID of your app.
The App ID does not exist in iTunes Connect, or Xcode. It is only in Developer Member Center.

Related

Get name of iOS app from path

I'm developing an app for jailbroken iOS devices that collects statistics about installed apps (ideally stats about both App Store and Cydia apps). Given the path of an app, is there an easy and reliable way to get the name of the App (as it appears in the Springboard)? Or is there a better way, not using the path at all (ie, is the info centralized somewhere)?
Here is a link to a StackOverflow that shows how to get a bundle info plist value (In this case the version).
How can my iphone app detect its own version number?
I beleive the attribute you are looking for is CFBundleDisplayName.
Here is apples list of attributes you can obtain.
http://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1
Every app has an info plist that contains its name and icon. Just look inside the .app bundle.

Different .app name - new submission iPhone

I have recently rewrote my application and started with a fresh project. The App its self is using the same bundle seed and Bundle identifier.
As my project has a slightly different name the app it produces a slightly differnet .app (file name) to what is already in the store.
Am i right in thinking as long as the bundle ID is the same i wont have any issues?
Thanks Ahead
So you want to make an update to your app in the AppStore. Then you are thinking right. As long as you don't change the bundle id it is ok. You can't change the bundle id when you make an app update but the app name of course.
Apple distinguish apps on the basis of bundle id (com.yourCompanyName.appName) so don't worry its OK.

Building and testing multiple apps - trying to understand appID's and profiles

I'm trying to understand app ID's and provisioning profiles here, I'm quite lost.
I am a registered Apple Developer as an individual under my full name, and I have 2 applications currently in the works, and 2 device UDID's ready for testing.
I'd like to be able to build IPA's for these two apps, upload them to TestFlight, and use them on either of the UDIDs I have on me.
I have several questions (if I should ask separate questions, I'd be happy to unless someone happens to be willing to answer them, I'd appreciate it):
1) Because I have 2 (or more in the future) applications, do I need a wildcard app ID?
2) If I have the app ID ET9WC78H9Q.com.mydevname.* listed in the portal - WHAT is the actual appID - ET9WC78H9Q.com.mydevname.*, ET9WC78H9Q.com.mydevname, or *?
3) Why can't you delete an AppID in the portal?
4) I've read that this must match the name Bundle Identifier. Currently it sits at ${PRODUCT_NAME:rfc1034identifier}. What specifically needs to go here to 'match'?
5) Do I need to create separate distribution profiles for each app, or can I tell each new app to use the wildcard identifier?
6) How do I tie a specific target to a specific provisioning profile in XCode 4? (TestFlight suggests to use the distribution profile)
Thank you,
You have to either have a wildcard app id, or 2 separate (specific, non-wildcard) app ids, one each.
That is a wildcard app id, so the app id is *
No idea.
Your PRODUCT_ NAME, which you specify in the Packaging section of the Build Settings screen.
A single distribution profile will work with multiple apps if the app ID for that profile is a wild-card app id. If they are specific app IDs, yes, you need a profile for each app.
You specify the provisioning profile in the Code Signing section of Settings, under CODE_SIGN_IDENTITY.
Because I have 2 (or more in the future) applications, do I need a wildcard app ID?
You don't. In fact, I recommend against it, since it's probably only going to give you problems with the App Store in the future.
If I have the app ID ET9WC78H9Q.com.mydevname.* listed in the portal - WHAT is the actual appID - ET9WC78H9Q.com.mydevname.*, ET9WC78H9Q.com.mydevname, or *?
That depends on the application. The first part is the Keychain space, which determines which applications can access the things you put in the Keychain. Then comes the actual application identifier, which is generally company.projectname. It would probably be ET9WC78H9Q.com.mydevname.myapplication in your case.
Why can't you delete an AppID in the portal?
On Mac and iOS, the AppID is very important for applications like the App Store. They have to be unique, since having two of them could mean that applications get installed in the wrong place. This means that even if you could remove them you couldn't ever add them again, which means there's no point in deleting them.
I've read that this must match the name Bundle Identifier. Currently it sits at ${PRODUCT_NAME:rfc1034identifier}. What specifically needs to go here to 'match'?
Wouldn't worry too much about that - simply look at the target summary page (click the solution then click the target and finally go to the summary tab) and it'll tell you the name it automatically picked for you.
Do I need to create separate distribution profiles for each app, or can I tell each new app to use the wildcard identifier?
You can definitely use the wildcard identifier, but the App Store will not necessarily like that.
How do I tie a specific target to a specific provisioning profile in XCode 4? (TestFlight suggests to use the distribution profile)
Wouldn't worry too much about that. If you got the code signing set up correctly (look at the build settings, then pick the development and deployment certificates) then you have nothing to worry about.
Can't say much more in here since most App Store things are guarded by an NDA. Consider asking this on https://devforums.apple.com instead.

consequences of itunes app name being different then xcode project name

what are the consequences of itunes app name being different then xcode project name?
Will my app not be accepted into the store if they are dfferent?
fyi I already created an app called X on itunes connect and linked it to an xcode project named Y. so is it possible to rename my project in xcode as also X and create a new app on itunes named x and then connect them?
Many apps have up to 6 different names. (project, target, product(file name), bundle ID suffix, bundle display (under icon) name, app store name, advertising name, etc.). You can configure these names all individually (I usually do). No problem as far as Apple is concerned, unless some of them are misleading or a trademark violation or something.
It doesn't matter at all. Apple doesn't see your xcode project, just the binary you submit. As long as the binary settings, like the code signing identity are correct, you could name it anything. Also, I don't recommend renaming your project. If you do it manually, you will break the project. And if you use xcode's built in way, you get a kind of weird result (from my experience).
It doesn't matter at all. Project name and even bundle name can be anything. The only thing matter is your bundle id matches app id in the iTunes Connect.

Help filling out "info.plist" file

I'm ready to submit my first app to the App Store, however I'm having trouble filling out some of the "Info.plist" fields. I don't want my app to be rejected because I did this wrong.
These are the fields I'm having trouble with:
Executable file,
Bundle identifier,
Bundle name and Bundle creator OS Typecode
Can you put anything on these fields or are you suppose to use certain values or names such the "App ID" given by Apple for your application?
I already have an "App ID" for my app but I don't have a website for my app yet.
Thank you for your help!
To work with Hotpaw2's answer:
Bundle creator is an obsolete
4-character field for iOS apps. I
leave it blank with no problems.
Leave this blank, as stated. (I used to write APLM for "Apple Mobile").
Bundle name is what appears under your
icon. Make sure it fits under the
icon. It has to be not misleadingly
different from your app's name.
For example, I have an app called Jewish Music Stream. I put JewishMusic in this field. It fits and it is similar to my app name. If I wrote Death Metal, I may have been rejected because that genre has nothing to do with what's offered in the app. If I would have written Jewish Music Stream, it would have appeared as Jewi...Stream or something like that.
Bundle ID is your unique reverse DNS.
You don't have to have a web site for
this particular app. But your
registered web domain and a unique app
name (or web page) would be
appropriate for this field (reversed
of course). It has to be compatible
with you provision (which might be
wildcarded). The Bundle ID should not
have the wildcard.
Mine was com.yetanotheriphoneapp.jms
The restriction on product file name
is no spaces or special characters.
Nobody sees it, so it can be almost
anything (unique for your apps and
non-misleading). I've had old obsolete
project names on mine, but the apps
were still accepted.
The truth is that people can see your app name if they have Xcode, or if they look into the iTunes folder for the actual binaries. This makes no difference, but it's an interesting habit - naming your binaries.
Good luck to you and may you make many successful apps!
Bundle creator is an obsolete 4-character field for iOS apps. I leave it blank with no problems.
Bundle name is what appears under your icon. Make sure it fits under the icon. It has to be not misleadingly different from your app's name.
Bundle ID is your unique reverse DNS. You don't have to have a web site for this particular app. But your registered web domain and a unique app name (or web page) would be appropriate for this field (reversed of course). It has to be compatible with your provision (which might be wildcarded). The Bundle ID should not have the wildcard.
The restriction on product file name is no spaces or special characters. Nobody sees it, so it can be almost anything (unique for your apps and non-misleading). I've had old obsolete project names on mine, but the apps were still accepted.