Appstore Deployment keeps Failing(Sealed Resource missing or invalid)

Hello,


when i try to upload the app from Xcode to the Appstore, i always get a mail with the error: Invalid Signature - A sealed resource is missing or invalid.

The File that seams to be affected is the main executable: Name.app/app.


Please notice: This is not a app written in Swift or Objective-C its written with the Ionic Framework 2.


The build with the Ionic Framework does succeed.

The build in Xcode also succeeds.

Notice the Code-signing is set to automatic.

Also the build successful passes validation in the Organizer.

Only after uploading to the Store and waiting a few minutes, i get the mail with the error.


Information:

Xcode Version: 9.0

macOS: 10.13

Provisioning Profile: Xcode Managed Profile

Signing Certificate: IPhone Developer: Name....

Certificate: iOS Distribution (Expires 09.10.18)

Profile: iOS Team Store Provisioning Profile: bundle identifier

Symbols: Included

Architectures: armv7 and arm64

Has someone an advice, what i have missed?

Kind Regards

Yann HN

Replies

Having exactly the same issue. Did you find any solution?

Also having the same issue.


In my case i've clean install macOS High Sierra 10.3.2, then clean install XCode 9.2


Then try all over again. Same result... this is driving me crazy.


Please some Apple employee, can give us some light on this?

What is the app name, exactly? Have you checked the .ipa for any extraneous files such as ds_store?

We ran into the same issue and, with @jacargentina's insight, we added a hacky workaround to fix our automated builds by creating a HFS+ disk image and built our Xcode archives there, which solved the issue for invalid code signing when submitting our app to TestFlight.

After some further investigation, we found that certain UTF-8 characters in certain localized file names were causing the issue. We opened a radar (radar:39539290) to track the problem.

We then noticed a related problem in our Simulator - links in NSAttributedTexts that used the offending file names did not display. Looking into that, we found information on a Unicode normalization bug in APFS (https://mjtsai.com/blog/2017/06/27/apfs-native-normalization/) that was the root cause of that issue.

Copying the offending files to a HFS+ disk image and back to APFS solved the issue. Unfortunatelly, these files did not come up as a change in Git, which still resulted in the original problem in other developers' machines. We found information on Git about this at https://git-scm.com/docs/git-config#git-config-coreprecomposeUnicode, where a command ('

git config --replace-all core.precomposeunicode
false
') allowed Git to handle the changed files. Now, Git showed the changes and by pushing the "fixed" files to the repo, we did not experience the issues with code validation or the missing text links in the Simulator.

This generated other problems for us because other users of the repository might not have the Git settings updated (above) and the fixed files would show as "changed" files, which could lead them to push back the 'faulty' files. Furthermore, to go between older and newer branches we needed to 'force' git pulls, which was inconvenient.

At the end, we decided to change our localized file names to ASCII file names and avoid the problems altogether.

I hope this helps someone!

Hi @db3d,


I have the same problem, are you using ionic framework too?. I have an app built on ionic framework and I have this issue, but I have other app built on react native and I don't have problems.


Thanks

Thank you so much for sharing the knowledge - Just copying problematic files to a HFS+ formetted disk and bringing them back in to the APFS formatted mac worked!

Hi All,


I have this problem from last two weeks and tried to contact Apple several times but still could't resoleve.

Please help me.

I think, it is not a ionic or a APFS problem. The signing error occurs, if you have a filename with an 'irregular' character.


For me, it was a filename transfered from a zip file, which was created on a windows system with german characters like ä, ö, ü and so on.


Copying these file on an non APFS device eliminates these 'irregular' characters, so its a workaround but not the reason.


I renamed my german spelled files in my ionic environment and everything was fine.


But thanks to @db3d, who shows me the right way.

Hi, I'm having the same issue compiling with LibGDX and RoboVM. I don't have any file with weird characters. Can you help me with this problem?

Code Block
ERROR ITMS-90035: "Invalid Signature. A sealed resource is missing or invalid. The file at path [IOSLauncher.app/IOSLauncher] is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html"


EDITED: After removing the three previously generated files (.ipa, .dSYM and .app) and full cleaning the project Application Loaded accepted the build. Seems that a bad configuration before generated the build in a bad way and doesn't update it properly.
I hope it helps everybody with the same issue.