In Xcode, at the target level do the following:
- First choose the provisioning profile for the Release configuration. (For
Any SDK
)
The provisioning profile must match the app's Bundle ID
(As you can see in the General tab).
- In the code signing identity, tap on the sub-menu for
Any iOS SDK
and make sure you choose Automatic
. If you can't see below.
- Clean All and Archive.
Choosing CodeSign identity:
In step 2, if you can't choose Automatic
, then it means you might not have a match between the AppID and the app's Bundle ID.
The AppID is pointed by the provisioning profile you chose.
If this is the case, then login in the developer portal and make sure that the provisioning profile you used points to the correct AppID.
To verify the the .ipa or .app before you submit try these commands.
Then look at the printout, and see if all looks right. Also verify the expiration date.
$cd <where the app is>
$unzip *.ipa
$cd Payload
$codesign -d --entitlement - *.app
$codesign --verify -dvvv *.app
$security cms -D -i *.app/embedded.mobileprovision
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…