How to override the build settings of watchkit app, watch extension and iPhone application dynamically using the command xcodebuild

We wanted to automate the build process and hence we are trying to do override the build serttings of iPhone, watchkit app, watch extension and the other settings from the command line tool.We are using the command /usr/bin/xcodebuild. Please find the below things where we need input

1. How to passs three different provisioning files (for iPhone app, watch extension, and watch app)

2. How to change the product name dynamically for all of these.

3. How to set the different OS deployment levels for iPhone ( from 7.0) and for watch extension,watch app (from OS 8.2)

4. How these entitlements can be created and added during the run time.

5. How to enable the groups (App group) for data sharing using the command. How to edit this group identifier.

Below is the command we are using to build

/usr/bin/xcodebuild -target <MyProjectTarget> -sdk iphoneos -configuration Release -xcconfig Config.h clean build

config.h has some of the information like

Below is content of config.h, for which we were assigning the values.

CODE_SIGN_IDENTITY =

PROVISION_PROFILE =

SDKROOT = iphoneos8.4

IPHONEOS_DEPLOYMENT_TARGET = 7.0

PRODUCT_NAME = TEST


Please help!! Thanks in advance

Replies

Hi,


I too have a same requirement.


Do have a solution to this problem statement ?