Application failed codesign verification

余生颓废 提交于 2019-12-30 06:29:01

问题


I'm getting the following error when trying to submit my app to the app store. I went through the initial provisioning process and am able to run the app on my phone so not sure what's wrong.

Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate.

EDIT: I tried downloading and installing a Distribution profile, but I'm still getting the error. Is there some way I need to link this new profile to my app in XCode? Thanks!

EDIT 2: I've now gotten a distribution provisioning profile from Apple and tried compiling with this. Getting the error "A valid provisioning profile for this executable was not found."


回答1:


Verify the following:

  • When creating the distibution profile, make sure that Distribution Method is "App Store".
  • In project settings, go to Build tab and make sure Code Signing Identity is the distribution profile you created for the App Store
  • In Target settings (double-click on Target in your project), go to Build tab and make sure Code Signing Identity is the distribution profile you created for the App Store

It's recommended that you have a configuration in your project settings for AdHoc and App Store builds. I've found it makes life easier when it comes time to deploy.




回答2:


For the Xcode build warning or Archive Validation error "Application failed codesign verification", see Apple's complete list of potential causes for this problem at "How do I resolve the error: Application failed codesign verification?".

For the error "A valid provisioning profile for this executable was not found", typically this error occurs while attempting to run your app on device thru Xcode yet you mentioned that you're uploading the app to the store? Ensure that you're following the recommended steps for uploading your iOS app to the store using "Steps to submit your app to the App Store".

For others receiving the error "A valid provisioning profile for this executable was not found" check that you're following Apple's recommended steps for running on device thru Xcode at "Steps to run your app on device thru Xcode".




回答3:


You can either double click a .mobileprovision file, or manually copy it to ~/Library/MobileDevice/Provisioning Profiles. Then it will show up inside the provisioning popup in your Target settings.




回答4:


Set the provisioning profile for both Project and Active Target.

Click Project -> Edit Project Settings change the code signing entity Click Project ->Edit Active Target and change the same code signing entity here as well.

You should be good to go.!




回答5:


Are you sure you provisioning profile is a distribution profile for app store and not a development/ad-hoc one??




回答6:


This error can also be caused if you incorrectly configured your application's "entitlements". A good place to check is for a warning in Xcode's Log Navigator (last page in left tab) and ensure that there is a green tick next to both the CodeSign and Validate steps in the build log when you Archive your project.




回答7:


I had the same issue and this is what I did to get it to work:

It turned out my Entitlements file was misformed.

Through much trial and error I have figured out the issue. For others' sanity, here is the proper configuration:

application-identifier          $(AppIdentifierPrefix)$(CFBundleIdentifier)

com.apple.developer.ubiquity-container-identifiers
      Item 0                     $(TeamIdentifierPrefix)$(CFBundleIdentifier)

This got it to validate successfully. I couldn't find this documented anywhere so hopefully it helps someone else.




回答8:


Here is one solution not listed that turned out to be my problem (and took me 3 days to find!). Set your Archive Build Configuration to Release. You can do this by going into PRODUCT -> EDIT SCHEME -> ARCHIVE -> BUILD CONFIGURATION -> SET TO RELEASE.

Good Luck!




回答9:


I'm facing the same issue having iCloud KVStore as Capability active:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.developer.icloud-container-identifiers</key>
    <array/>
    <key>com.apple.developer.ubiquity-kvstore-identifier</key>
    <string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>

Xcode fails to sign to binary when I try to change the 'com.apple.developer.ubiquity-kvstore-identifier identifier to the main app KVStore Identifier as described in

Configuring Common Key-Value Storage for Multiple Apps



来源:https://stackoverflow.com/questions/3474158/application-failed-codesign-verification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!