Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding "WKAppBundleIdentifier" and "WKCompanionAppBundleIdentifier" keys for different Build schemes (Debug, Distribution, Release)

I have set different build settings for different build schemes in my XCode to test demo app and appstore app.

To do this, I have created different provisioning profiles with different bundle identifiers for debug and release schemes.

Added different app icons for debug and appstore builds to differentiate them. Everything works perfectly as expected. The problem occurred when I added new target for watch app. When we add a watch target, we have to set main app bundle identifier for WatchApp(WKAppBundleIdentifier) and watch app bundle identifier for WatchAppExtension(WKCompanionAppBundleIdentifier) in their respective property lists(plist). Here we do not have option to set different bundle identifiers for different schemes and the error when we switch to different scheme and compile.

Solution #: Each time need to change these identifiers when we compile app for different schemes. Its really annoying and time consuming.

Its really helpful and saves my time if anyone suggests better solution.

Thanks, Sandeep

like image 441
G S Avatar asked May 12 '16 08:05

G S


1 Answers

You can achieve it by adding user-defined strings in build settings. Here is a complete tutorial. Hope it helps you.

like image 170
Misternewb Avatar answered Nov 09 '22 17:11

Misternewb