Do i need a separate Distribution for each Apple AppStore submission? - ios

I'm so confused -
after an entire day's struggle, i finally figured out how to submit my app to Apple via archiving & distributing from xcode.
... that was my free version
now i made my code changes, and on my pList file, i changed the Bundle Identifier to com.blah.mygame.pro instead of com.blah.mygame.lite
i also changed the Bundle name to be My Game Pro instead of My Game Lite
but now i'm confused - when i click on the project in Xcode, and i hit "Target" instead of "Project", i can't find my release/distribution profile! (my develop/debug profile) is still there.
if i were to click Project instead of Targets then i actually do see my previous distribution profile.
however, in my develloper portal, i had actually set my distribution profile to be linked up with the "com.blah.mygame.lite" identifier. was i not supposed to do this???
weirdly enough, when i made my distrubution profile earlier today, i say something like "mygame * -" or something that i coulda linked it to. but i just chose com.blah.mygame.lite without thinking
are you supposed to have multiple distribution profiles? one for every app? what i just want a lite and pro version?
** edit:
bonus points for this:
if i only needed 1 provisioning profile, (and since i messed up naming my previous provisioning profiles)... how do i rename all my distribution profiles without it interfering/messing up with my apps?? it's already submitted and awaiting approval
* EDIT # 2:
okay, i got both apps submitted with 2 separate distribution profiles.
however, is there any way that i can rename a distribution profiles while the app being submitted is still using it??
i had mistakenly named it "My Company Distribution Profile" when i should have named it "Distribution Profile for My Game Pro Version"

You have two options for fixing it:
Use a AppId like. com.blah.mygame.* . You can replace the * with any number of strings and use it for creating different application.
I won't recommend this approach, because the issue with this is you won’t be able to use push services or in-app purchases. You might not plan to use these services now, but if you change your mind, you won’t be able to change your app ID without creating a new app.
Create different AppId for different Apps. It'll be a good approach

Sounds like you're using a single AppID for both of your apps. You can only use one provisioning profile for multiple apps only if the AppID bound to that profile has a wildcard (e.g. "com.sample.*").
quoted from the iOS Provisioning Portal:
The Bundle Identifier portion of an App ID can be substituted with a
wild-card character (asterisk '*') so that a single App ID may be used
to build and install multiple applications. If the wild-card character
is not used, the Bundle Identifier portion of your App ID must be
input as your CF Bundle ID in Xcode to allow the application to
install on your device. The Bundle Seed ID portion of your App ID does
not need to be input into Xcode. Wild-card App IDs cannot be used with
the Push Notifications or for In-App Purchase.

I hope you have created an AppId with this bundle identifier com.blah.mygame.lite and created a distribution profile linked with this AppId. By doing like that, you can run or archive your apps only if it is having the same AppId like this com.blah.mygame.lite. If you want to create an AppId to run all apps, then you need a Wildcard AppId like this com.* . And If you think you need to run the app with AppId com.blah.mygame.pro then you need to create another appId like that and associate that appId with another distribution profile or modify the old one and download and install it and use.

There is no need of distribution profile for every app....one is enough for every time but
your bundle identifier is same as you given in your distribution provisioning profile when
you create it first time....

Related

Cannot generate app-group provisioning profile or get one that matches

I have an iOS app with an app group to receive inbound images from other apps. I simply cannot get it to sign. I have gone through signing a bunch so the process is very familiar but I can't even get the group identifier to show up under provisioning in the developer center. Can someone help? Here is the scenario ->
I cannot create a provisioning profile for my app group group.com.xxxxxx.bookapp.
I have made a new app group identifier group.com.xxxxxx.bookapp.
I have added it to my app identifier in com.xxxxxx.bookapp under capabilities in the dev center, and selected group.com.xxxxxx.bookapp and it looks correct.
I have regenerated all my provisioning profiles.
The app will build fine until it gets to the share extension target and it says Provisioning profile "Provisioning Profile Name" has app ID "com.xxxxxx.bookapp", which does not match the bundle ID "com.xxxxxx.bookapp.shareextension".
I cannot generate a provisioning profile for "com.xxxxxx.bookapp.shareextension" because it does not show up in the lists of available id's in the developer portal when I try to create a new profile.
I cannot use wildcard because I have push notifications and the share extension will not allow it anyways
Ok so, it turns out you have to create a whole new app id that goes with your app group, add the same app group to it as your main target, then create a provisioning profile for it like it is its own app. Now I am able to publish like its two completely different apps, which is kinda is, just a bit convoluted and the docs don't really mention this.

How to completely remove bundle id in iOS development?

How can I reuse the bundle ID I have created for the app ID? I even delete the associated app ID but the bundle ID still unavailable.Does it to say bundle ID couldn't be removed completely once created?
The bundle id can't be reused as exact. For example com.abc.xxx can be used only once. If you had created this app Id from one account, you can't create the same app Id from the other account. However, you will still be able to create a new one as com.abc.xxx1 like or so. There should be atleast 1 character difference in the app Id's
If you want to delete an app ID, follow these steps:
Open https://developer.apple.com and enter using your credentials.
Click on Identifiers under the Certificates, Identifiers & Profiles section.
Now click on the App ID you want to Delete.
Click on Remove next to Edit your App ID Configuration.
Again click on Remove in the confirmation message that opens.
I'm not sure what your exact scenario is, you didn't provide enough information to know that. However, I came across a similar problem which was as follows:
Some time ago I registered a new Apple Account and created an iOS app with it. I did not pay for that, i.e. the app could only ever be used for 7 days. I've never submitted that app to the app store. Nonetheless, the bundle identifier of the app was associated with that particular account.
Some time later I registered another Apple Account. This time with a payed subscription. When I attempted to sign the app I created with the first account, Xcode complained as follows:
Failed to register bundle identifier. The app identifier "xy" cannot be registered to your development team because it is not available.
and
No profiles for 'xy' were found. Xcode couldn't file any iOS App Development provisioning profiles matching 'xy'.
It seems that the bundle identifier gets strictly associated with the provisioning profile of the first account. The way to solve this is to delete that particular provisioning profile. You can do so by going to the following folder and deleting the corresponding file in that folder:
~/Library/MobileDevice/Provisioning Profiles/

Weird "The executable was signed with invalid entitlements" error... seems caused by iOS 8 sharing?

Due to iOS 8 sharing, I've had to create a bundle ID and provisioning profile for sharing. This new bundle ID is linked to my existing bundle ID through an app group, and my entitlements file specifies the app group. Now, however, my wildcard provisioning profile doesn't work. When I try to build, Xcode says "The executable was signed with invalid entitlements". Only when I use the provisioning profile with a specific bundle ID does it work. It's becoming a huge issue for my company.
Any ideas? We want to use a wildcard because we add devices a lot, and a wildcard doesn't require a refresh of our provisioning profiles for all the devs.
When you need to use special entitlements (iCloud, push notifications, etc.) you can no longer use wildcard IDs. You will need to create a unique ID on Apple's dev site for each of your app that needs these capabilities, if each of the apps need to be installed at the same time on one device.
If your different apps will never need to be installed by the same person, you could get by having multiple apps use the same bundle ID, but I wouldn't recommend it. If someone has App A on the device, and at some point in the future needs to install app B, it will replace it, and could cause problems if the app uses things like Core Data.

iOS8 extension needs own provisioning profile?

I am starting an iOS 8 extension but I can't run it on my device. The error when trying to run it is:
No matching provisioning profiles found
The provisioning profile specified in your build settings
(“ExtensionName”) has an AppID of net.company.AppName which does not
match your bundle identifier net.company.AppName.ExtensionName.
Xcode can resolve this issue by downloading a new provisioning profile
from the Member Center.
Do I need a separate provisioning profile for both the main app and the extension ?
Should they share a bundle identifier (by default it adds the extension name to the bundle identifier, so perhaps not) ?
If it has a separate bundle identifier how is that reflected in the provisioning profile (if there is a separate one) ?
It would seem that Xcode would prefer it that way, however there's nothing stopping you from using a wildcard profile until you want to do an Adhoc or Release to the App Store. More to the point of your question though, for every target that you have, you need a profile and bundle ID. So yes, you "need" another provisioning profile for your Extension, although I expect Apple to streamline this process.
All in all, it's probably best to just use a WildCard dev profile until you need a provisioning profile. Remember this is all a beta, and they're still working on pretty much everything.
Extensions are separate targets from the host app. You have to treat them as though they are separate apps with different bundle identifiers and different provisioning profiles.
It's best if you just create them during testing instead of using wildcards because you may need to test some capabilities that you enabled, for example App Group so that your extension and host app can access the same container.
Note that if you want to have any capabilities enabled for your host app and extensions, you have to enable them individually for all of them.
I've located this documentation pertaining to App Extensions. If you read the bottom of page 20 if seems that using the same distribution certificate is actually suggested. I've gone ahead and changed my bundle identifier for the Today Extension to extend my applications. For example, com.DeveloperName.AppName.TodayExtension, created an App ID in the Dev Center to correspond with that, and created a distribution profile for it.
My app +Quotes has successfully been updated by following these steps. I have not experienced any issues with the app or extension, but Xcode does seem to get a little confused when trying to auto assign the correct provisioning profiles for my extension now. Selecting them manually solves this.
You do need a separate provisioning profile for you extension but with the same certificate your main app has. When you are creating a new provisioning profile, your Extension's app id will also appear in the list, choose that, and proceed to create a new provisioning profile.
Also choose that provisioning profile in the target of your extension.
I simply use "Automatically manage sign in" until I need to push to App store. This works out of the box with simulators, haven't tried with devices yet.
Few pointers for Appstore Build:
I created one wildcard id for every notification extension, but the prefix of this wildcard bundle id should match your app's bundle id as prefixed. If it's not like this, this error will come up: "Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier". So, if your app's bundle-id is: "com.companyName.appName", the wildcard bundle-id for your extension should be "com.companyName.appName.*". You can then replace * with a specific notification extension in the XCode. Note apple only allows one period(".") after the app's bundle id for naming your extension's bundle id.
The version and build number of your extension should match that of your app.
Once App Id is created, create a distribution provisioning profile with this and use it in XCode.

Run App Store and Ad-Hoc builds side by side

I want my testers to be able to have App Store and Ad-Hoc versions of my app on the same device. The app requires an explicit App ID, which in turn means that the Bundle ID must be fixed, too. (I.e., if I just append "-test" to it, signing will not work.) Am I right to assume that I must create a separate App ID (say, "com.mycompany.myapp-test") to achieve this? Or is there another way?
When archiving the app, Xcode initially uses the App Store provisioning profile, as that's what the "Distribution" build configuration is set to. When I click "Distribute…" in the organizer and select "Save for Enterprise or Ad-Hoc deployment", I am subsequently asked to select a code signing identity. Will selecting the Ad-Hoc profile's identity here erase the previously applied distribution profile from the archive and re-sign it with the Ad-Hoc profile? Or do I have to select the correct profile when creating the archive already, thus keeping separate archives for App Store and Ad-Hoc distribution?
The Bundle ID of an application identify it uniquely. Only one application with a given BundleID can be installed on the same iPhone, as two applications with the same BundleID are considered to be the same applications (and the one with the most recent version will replace the older one).
So yes, to have both the AppStore and AdHoc version of the same application on the same device, each variation of your application (AppStore and AdHoc) much have its own Bundle ID.
Am I right to assume that I must create a separate App ID (say, "com.mycompany.myapp-test") to achieve this?
Yes
You can use a Wildcard instead "com.mycompany.*" then you can use com.mycompany.whatEverYouWant
Thats nice for debugging various versions but In-App Purchase, Game Center and Push Notification are unavailable for Wildcards.
To answer the second part of my question: If I don't resign the archive during the exporting process, (even if it has already been signed with the Ad-Hoc distribution profile), iOS refuses to install the app (saying something like "Error: The app cannot be installed at the moment."). It does, however, install the embedded Ad-Hoc distribution profile!?

Resources