Build number mismatch of iOS parent app and app clip

40 views Asked by At

I want to set the CFBundleShortVersionString and CFBundleVersion of my app clip target dynamically. It should match that of the parent/main app. I tried two solutions:

  • I added Run script to the app clip target in Build Settings as follows:
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $GL_BUILD_NAME" "$INFOPLIST"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $GL_BUILD_NUMBER" "$INFOPLIST"

But this doesn't set the CFBundleShortVersionString and CFBundleVersion of the app clip target. I still get build number mismatch error while archiving.

  • I also added User-Defined variables (APP_VERSION and APP_BUILD) in Project Build setting and set the Current Project Version and Marketing Version in Build settings of the project. The main target and app clip then read these values and app archives fine. The problem is that I cannot set APP_VERSION and APP_BUILD to be reading from an environment variable.

Any help would be appreciated.

0

There are 0 answers