Resigning iOS App IPA with multiple targets and provisioning profiles.
Sungwon Lee

First of all thanks for the great post! This was extremely helpful. However I run into some problems and I want to share my findings to complement this post.

1. If you are distributing for the App Store and have a watch target and Swift code, make sure the OUTPUT_FOLDER from step 1 contains additional folders (like SwiftSupport and WatchKitSupport2). Without this folders you may successfully pass the Application Loader validations, but the app processing in iTunes Connect may fail.

2. After Step #2, I updated Info.plist files for all targets inside the Payload. For example, for the App target I executed the following commands:

/usr/libexec/PlistBuddy OUTPUT_FOLDER/Payload/
> Set :CFBundleIdentifier APP_ID

Make sure you update the WKCompanionAppBundleIdentifier and WKAppBundleIdentifer for the watch and watch extension targets accordingly.

3. For distributing to the App Store I skipped Step #3, but ended up editing the entitlements files anyhow, changing values like application-identifier,, and keychain-access-groups as needed.