Reputation: 19281
I have a suite of apps on the app-store and I want to add Apple Watch support. These apps share a lot of common code and they are built from a single project with multiple targets.
I'd like to have a single WatchKit App with just one unique bundle ID, that is included in the target of each iOS apps, such that it is bundled with all of them, but if you install more than one app in my suite you would only get the single WatchKit App on your watch.
Is this possible technically, and allowed?
Upvotes: 0
Views: 430
Reputation: 2660
I don't think it's possible, since every watch extension's bundle ID is based on your application's bundle, and two applications can't share the same bundle ID.
The bundle IDs for both new targets are configured automatically, based on the bundle ID of your iOS app. The base IDs for all three bundles must match; if you change your iOS app’s bundle ID, you must update the other bundle IDs accordingly.
Also, the watch extension linked to an application is in fact contained in it. You can't make reference to an extension that don't reside inside your application's bundle.
Upvotes: 1
Reputation: 5536
Unfortunately, a WatchKit app resides as an extension to one host app, making multiple apps having one common extension impossible, and thus making one WatchKit app on multiple apps impossible.
Aside from this point, as you stated that one bundleID might work, the bundleID must have the parent app's bundle ID for the app to run, therefore ruling out sharing bundle IDs since each app must have a different bundle ID.
Upvotes: 1