XCode

Invalid Provisioning Profile Signature – STATE_ERROR.VALIDATION_ERROR.90165

I am trying to upload an archive to App Store Connect, and suddenly am getting the following error:

Invalid Provisioning Profile Signature. The provisioning profile included in the bundle cannot be used to submit apps to the iOS App Store until it has a valid signature from Apple. For more information, visit the iOS Developer Portal. With error code STATE_ERROR.VALIDATION_ERROR.90165 for id …

I am using “Automatically manage signing” and have uploaded an archive just yesterday for the same app with no issue.

 

Answer 1

The issue was caused by two expired Apple certificates1.

Solution is to

  1. Go to Certificates, Identifiers & Profiles
  2. Open the provision profile
  3. Press Edit in the top right
  4. Press Save without making any changes This will regenerate the profile with the correct CAs.

Now delete the ~/Library/MobileDevice/Provisioning Profiles folder and let xcode redownload the profiles again.

itms-90562: invalid bundle – one or more dynamic libraries

itms-90562: invalid bundle – one or more dynamic libraries that are referenced by your app are not present in the dylib search path.

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES build setting like this:

App target (main target) — set to NO (mine was YES)

Watch target — set to YES (mine was NO)

Watch App Extension target — set to NO (mine was YES)

Edit: I figured this out by creating a new, empty watch project in Xcode 8, and cross-referencing the differences between build settings in the new Xcode 8 template project, and my crusty old ancient project. The settings above are what the Xcode 8 template project has.