Hi everyone! I’m working on a Capacitor 3.x for iOS and Android platforms. I’ve added a watchOS app that depends on the iOS app (a companion app). The project has different build configurations (development and release) as well as build schemes. The purpose of these build schemes is to generate application bundles for our development and production environments, and be able to publish these 2 apps in the store. We only publish the release app, the “development” app is only used in TestFlight. We use Ionic Appflow to build and publish the apps to the Stores. This has been working great until now with the addition of the watchOS app.
In our Native Config, we have setup the general config to override the BUNDLE_ID and NAME. So for the development app we have:
- BUNDLE_ID: com.myapp.development
- NAME: My App DEV
and for the production app native config we have:
- BUNDLE_ID: com.myapp
- NAME: My App
The watch app configuration requires that the bundle ID contains the iOS app bundle ID as the prefix. For example, the development build configuration:
- watch app PRODUCT_BUNDLE_IDENTIFIER: com.myapp.development.watchkitapp
- watch extension PRODUCT_BUNDLE_IDENTIFIER: com.myapp.development.watchkitapp.watchkitextension
- WKAppBundleIdentifier: com.myapp.development.watchkitapp
and the release build configuration:
- watch app PRODUCT_BUNDLE_IDENTIFIER: com.myapp.watchkitapp
- watch extension PRODUCT_BUNDLE_IDENTIFIER: com.myapp.development.watchkitapp.watchkitextension
- WKAppBundleIdentifier: com.myapp.watchkitapp
When using Appflow, the BUNDLE_ID only overrides the iOS app bundle ID, and this error is generated:
[23:11:40]: $ set -o pipefail && xcodebuild -workspace /Users/ionic/builds/myapp/ios/App/App.xcworkspace -scheme App -destination 'generic/platform=iOS' -archivePath /Users/ionic/Library/Developer/Xcode/Archives/2021-08-30/id-app-store\ 2021-08-30\ 23.11.40.xcarchive archive CODE_SIGN_IDENTITY=Apple\ Distribution:\ MyApp\(123TEST\) | tee /Users/ionic/Library/Logs/gym/MyApp-App.log | xcpretty
[23:11:50]: ▸ ❌ error: Provisioning profile "MyApp - DEV - App Store" has app ID "com.myapp.development", which does not match the bundle ID "com.myapp.watchkitapp". (in target 'WatchApp' from project 'App')
Some questions:
- Does Ionic Appflow support watchOS app builds?
- How I can override the watch app and watch app extension bundles IDs? or,
- Is there any way to use the defined build configurations and build schemes instead of Native Config general config?
Any help is really appreciated,
Thanks!