Choose the bundle identifier for an iOS and Mac app - ios

Suppose that I have an app called A.
Bundle Identifiers must be unique across all Mac and iOS apps. This means that if I have the app A on the iOS App Store with the Bundle ID com.mycompany.a, I cannot create an app on the Mac App Store with the same Bundle ID com.mycompany.a.
Ok, said that, what is the best way to distinguish the Bundle IDs?
Some examples I can think of:
com.mycompany.a_ios, com.mycompany.a_mac
com.mycompany.ios.a, com.mycompany.mac.a
Are there others that come to mind? Which you used?

Rather a request for an opinion than a question I'd say, but com.mycompany.application.platform is what I'd use.
The reason would be to make it more and more granular towards the end, seeing the platform as a sub component of the actual application.

Apple now allows you to use a single bundle ID for Mac and iOS apps through Universal Purchase:
Universal Purchase for Mac Apps Now Available
The macOS version of your app can now be included in a universal purchase, allowing customers to enjoy your app and in‑app purchases across iOS, iPadOS, macOS, watchOS, and tvOS by purchasing only once. Get started by using a single bundle ID for your apps in Xcode and setting up your app record for universal purchase in App Store Connect.
https://developer.apple.com/news/?id=03232020b
Offering Universal Purchase
Upload your apps to the app record using a single bundle ID. While the bundle ID must match the bundle ID you enter in App Store Connect, the apps can have different version numbers and build strings.
https://developer.apple.com/support/universal-purchase/

Related

Maintain same Apple App Prefix and Bundle Identifier for B2B and AppStore apps?

We have an existing AppStore app and we also want to create a version of the app that our clients can distribute through their MDMs without re-signing it. The main reason they want to use an MDM is so they can control when they upgrade to new versions of our app irregardless of their App Store upgrades.
We've successfully done that using a second Apple Enterprise account but that app has a different App Prefix and Bundle Identifier and so the deeplinks we've configured through our Branch.io no longer work because we have to to specify the App Prefix and Bundle Identifier in the Branch configuration. The Branch configuration allows multiple Bundle Identifiers but only one App Prefix.
Ideally, we can have one deeplink for both the App Store and MDM versions of the app.
If we join the Apple B2B program, can we:
Give them an app through the B2B program with the same App Prefix as the App Store and signed as an App Store app
That they can use with their MDM without them having to re-sign it
That they can choose to update whenever they want (or at least on a different schedule than App Store)
And it will have the same Apple App Prefix and Bundle Identifier?
The bundle id is the app. You cannot have the same bundle id for an App Store app and a custom app, as then you would have two apps with the same bundle id.
Custom B2B apps are still distributed through App Store Connect: an app is either a custom app or an App Store app. It can't be both at the same time.
All of the apps you publish under a particular developer program membership have the same app prefix.
So, you can publish two different versions of your app, one public and one custom, with different bundle ids, but they will have the same app prefix.
The only problem you would have is if a user had both the public and private apps on their device; which one is launched to handle the deep link isn't defined, it presumably your client would use their MDM to manage this.

Overwriting existing ios native app with xamarin app

I have an app that was built in native ios
We are developing a new app on xamarin
My problem the users are all over the place and due to my predecessors bad management the ipads are locked with no mdm. And the apps are whitelisted
If i give the new app the same bundle ID etc will it overwrite the old native ID?
Thanks in advance
A bundle ID or bundle identifier uniquely identifies an application in
Apple's ecosystem. This means that no two applications can have the
same bundle identifier.
If you name the new app with the same bundle id with the old one, it will overwrite the old app.
Refer: bundle_ids
what-are-app-ids-and-bundle-identifiers.

iOS IAP Sandbox - is it possible to test on a different bundle ID

This is basically the same as this question: Test iPhone in-app purchases on a different bundle? from 2010 - which never had an accepted answer and for which both unaccepted answers are more conjecture than canonical.
Working on an app using React native and Firebase. We use Crashlytics beta to send out beta test versions, which work via a slightly different bundle ID - eg: com.companyname.appname for the production app and com.companyname.appname.dev for the beta. In xCode this is handled with two different build targets, and these also have different Google Info plists associated with them (in order to use the prod/dev firestore databases).
Now we are working on adding in app purchases, and I hit the problem that in order to properly test them before release, it appears that the bundle ID needs to match perfectly (no wildcards).
I'd prefer not to use the production build for testing because it means pointing the testers to the production database, but it feels like Apple have designed a system that enforces that. It feels like there must be a better way that I am missing. How are others handling IAP testing for iOS apps?
You need to use the same Bundle Identifier for the same App to test IAP.
If your app contains the DEV Mobile Provisioning Profile then it is automatically linked to SandBox Mode. You just need to create Sandbox Testers to https://itunesconnect.apple.com
If you require to test Auto Renew IAP there is also way to do this. Apple provides the Sandbox & Production URLs to communicate for All Previously purchased IAP returned to App. For Auto Renew please check this link.
I was able to get it to work by simply creating another App Store Connect record with the dev bundle id (com.companyname.appname.dev) and then creating the same IAP configuration in both records. It's not pretty but it's better than having the same bundle id for multiple environments.

Can 2 same bundle ID cause any conflict?

I read from Cocoa Core Competencies
that
An App ID is a two-part string used to identify one or more apps from
a single development team. The string consists of a Team ID and a
bundle ID search string, with a period (.) separating the two parts.
However it also says that,
The bundle ID is a unique identifier that identifies a single app and
cannot be used by other teams.
I see that we can't register an App ID in the Developer account portal with same bundle ID of an app that is on the appstore.
An App ID with Identifier 'com.example.myapp' is not available. Please enter a different string.
So I don't know if 2 apps from 2 developers can have same bundle ID (like com.example.MyApp), and if this causes any conflicts?
Can these 2 apps be installed on the device?
Can these 2 apps be allowed on the app store?
How does Push Notification work with these 2 apps ?
I see that many services like Fabric Crashlytics, Urban Airship, Google App Invites, ... depends on the Bundle ID to differentiate among apps.
Can these 2 apps be installed on the device?
No, it won't. It will replace the existing app.
Can these 2 apps be allowed on the app store?
No, you cannot create Apps on App Store with same bundle ID.
How does Push Notification work with these 2 apps ?
Push Notifications will show for the app it is made for whose Push Certificates etc are made
Can these 2 apps be installed on the device?
No. If you tried to install another application with same bundle ID it will replace the existing one.
Can these 2 apps be allowed on the app store?
No. When you upload the application on an App store it will ask for unique bundle ID.
If you use same bundle identifier for two different application and try to run on device then previous application is replaced from Device and current application is installed on Device. if you want to run two different application then you can use wild card id.
for App store when you creating application in iTunes connect first it check with existing App ID(same with bundle identifier in Xcode) on app store if exits the you have to put different app id.

iOS - same .app name

I've uploaded several .app's the the iTunes store, where the "executable" file (ie. filename.app) is the same.
What are the repercussion's of this on an actual device, when an actual person downloads both onto their iPad/Phone/Touch , and possibly is running both?
The best answer would be that it is inconsequential since the bundleID's store the .app in different respective folders, but I do need further insight.
The name you give the app is irrelevant. All that matters is the bundle ID. These must be unique. From the iTunesConnect Developer's Guide:
An identifier used by iOS and Mac OS X
to recognize any future updates to
your app. Your Bundle ID must be
registered with Apple and unique to
your app. Bundle IDs are app-type
specific (either iOS or Mac OS X). The
same Bundle ID cannot be used for both
iOS and Mac OS X apps.
Think about the consequences of the alternative. If I name my app MyApp and you name your app MyApp, then a user who bought both would be in trouble. The bundle ID is the unique identifier for each app. The name of the app is unique for convenience and to avoid confusion when purchasing an app, but the bundle identifier is unique to keep products from overwriting one another.

Resources