iOS code signing fails: “A sealed resource is miss

2019-04-07 07:57发布

问题:

I have been with this problem already 8 hours unable to solve it.

Whats Cool JLD$ codesign -vvvv build/Distribution-iphoneos/Whats\ cool\?.app
build/Distribution-iphoneos/Whats cool?.app: a sealed resource is missing or invalid
/Users/JLD/Desktop/iOS Development/Whats Cool/build/Distribution-iphoneos/Whats
cool?.app/Whats cool?: resource modified

I have tried the solutions posted on all these threads to no avail:

  • http://discussions.info.apple.com/thread.jspa?threadID=1590980&start=0&tstart=0
  • http://discussions.apple.com/message.jspa?messageID=9167082#9167082
  • http://www.iphonedevsdk.com/forum/iphone-sdk-development/2256-application-failed-codesign-verification.html
  • http://forums.macrumors.com/showthread.php?t=584209
  • How to solve "Application failed codesign verification" when uploading to iTunes Connect?

I even tried recreating the whole project again redoing all the IB connections and nothing works! It builds everything, but it is unable to code sign it! So I'm unable to upload it through the AppLoader.

I am doing all these following the instructions found at the provisioning profile on the Distribute application page.

  • http://developer.apple.com/ios/manage/distribution/index.action

I even tried building from another Mac. I have my distribution profile and my distribution certificate both set to WildCard. But it still doesn't work. I made a new app under a different name with another Bundle ID to no avail. I don't know what to try anymore! Thank you future problem solver! I know you are there so come to my aid, I'll thank you forever!

UPDATE: I tried to make the new project from scratch. Copying the source code and remaking all the connections on IB to no avail. I even followed this link with instructions:

  • http://techiechok.com/2009/03/30/resolving-iphone-code-signing-error/

Unsuccessful. I don't know what else to do. I'm even considering using one technical incident to solve this problem once and for all.

回答1:

I just experienced this error trying to sign an archive with Xcode 4 on Lion. The problem turned out to be related to the fact that the archive had been zipped on one machine and transported to another --- the zip utility did not support symbolic links, and the app code signature uses a symlink inside the bundle, so the unzipped archive was invalid.

Possible solutions are:

  1. Use the Finder's contextual (ctrl-click/right-click) menu and choose "Compress" to create the zip file, or:
  2. Use the command line version of zip and provide it with the -y argument to preserve symbolic links.


回答2:

This isn't a specific answer I'm afraid, but something you may not have thought about.

From your command line snippet, it looks like you're code signing your app bundle after it's been built. Are you moving the bundle (.app folder or maybe an IPA or ZIP file) from another machine, or from another drive? I've had problems with moving app bundles between file systems that don't support symbolic links properly. Are you using a network drive, or have a local drive that's not formatted for Mac OS.



回答3:

Solved. The problem was a '?' character on the product name. Shouldn't be like that but that's how it is. Nowhere apple says that that makes a codesign verification issue.



回答4:

Apple's new APFS file system has some bugs to process unicode characters and it is causing the issue.

Moving the whole project to the legacy MacOS Extended volume and archiving again solved the issue.