Code signing Error: Application failed codesign verification

前端 未结 6 1877
猫巷女王i
猫巷女王i 2020-12-01 15:16

I am very new to iOS development, I have an app all set and ready to be distributed, but I seem to get this error every single time I run the application on my DEVICE only,

相关标签:
6条回答
  • 2020-12-01 15:27

    I had same issue even after checking all signing stuff. I had the old "Can be debugged" setting in my entitlements file. Switching it to get-task-allowed fixed the problem. Apple has instructions on how to debug signing issues.

    0 讨论(0)
  • 2020-12-01 15:40

    May be xcode selects one of the development profile to sign the code with it.

    Make sure it uses the distribution profile

    press the project, in the Build Settings -> Code Signing section expand Code Signing Identity -> Release - > make sure that Any iOS SDK is referring to distribution profile.

    0 讨论(0)
  • 2020-12-01 15:42

    I had this problem but found that none of the above issues solved it. Eventually I found the solution by working through Apple's Technical Note (https://developer.apple.com/legacy/library/technotes/tn2250/_index.html) on the subject.

    The specific problem in my case was an asset that was either missing or was hidden (I didn't find out which), but that wasn't flagged as a problem file anywhere else in the build process. I've outlined the steps I took to discover this below.

    1. Archive the build, save for adhoc deployment.
    2. Navigate to the ipa in finder, rename to .zip.
    3. Double-click to unarchive, open the 'Payload' folder
    4. Open a Terminal, and enter the following:

      codesign --verify -vvvv -R='anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)' /Path/to/your/app.app

    5. Instead of entering /Path/to/your/app.app, drag and drop the *.app file from the Payload folder into the terminal, ensure there's a space between the end of the command and the filename, and hit return.

    I got an error in the output saying 'a sealed resource is missing or invalid', with the name of the file causing the problem (it began with a dot, which may have been the problem). When I searched for the filename in the XCode project browser I found the file, but when I looked in the Finder, it wasn't on disk.

    The fix was simply to remove the file from the XCode project browser, and the error went away. I would definitely say to anyone getting a similar problem - work through Apple's tech notes. They're a bit badly worded but the solution is likely to be in there somewhere.

    0 讨论(0)
  • 2020-12-01 15:46

    You could solve it is not leaving the profile selection to xcode. Manually select the correct release profile in the project settings and it will go through.

    0 讨论(0)
  • 2020-12-01 15:51

    I had the same problem and solved it by:

    • Changing the Automatic Profile Selector value from "iPhone Developer" to "iPhone Distribution" according to section Assigning Provisioning Profiles to Build Configurations.
    • Download the Distribution Provisioning Profile and double-click on it in order to add it.
    0 讨论(0)
  • 2020-12-01 15:52

    I had the exact same issue..

    Go to Keychain Access

    1. Verify that you have your Public and Private keys set up correctly. This is a good reference https://developer.apple.com/legacy/library/technotes/tn2250/_index.html

    2. I had previously adjusted my Keychain Certificate Preferences to make Outlook work but that pretty much screwed up XCode code signing..

    After I set these to the "best attempt" setting (see screenshot) validation worked fine

    enter image description here

    0 讨论(0)
提交回复
热议问题