Invalid signature - the code object is not signed at all

I can ship my app fine via Xcode 6.3.2. Validation and analysis are going well. Once it successfully goes to the app store, I get an email from Apple:

"Dear Developer, We have encountered one or more problems with your recent delivery for" Application ". The following issues need to be resolved in order to handle your delivery: Invalid signature - the code object is not signed at all. Make sure you signed the application with a distribution certificate and not a special certificate or development certificate.Make sure the code signing settings in Xcode are correct at the target level (which override any values ​​at the project level.) Also, make sure that the package you download was created using the Release target in Xcode, and not for the Simulator target If you are sure your code signing settings are correct, select Clear All in Xcode, delete the build directory in Finder, and rebuild the release target.For more information refer tohttps://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html Once these issues are fixed, you can re-add the corrected binary.

I tried to reinstall the distribution certificate by regenerating the distribution provisioning profile by adding "--deep" to the code signing "Other code signing flags". I even checked the package name etc., everything is alphanumeric. I was able to file a fine on May 22, now everything breaks down on June 3.

Doesn't make any sense, any help would be appreciated!

UPDATE AND SOLUTION:

Until I have a good explanation as to why this happened in the last week, I finally found a solution this morning.

I started with a new project and pushed nothing but an ID to the app store and fixed the version and build numbers that were handling fine. After that, I started collecting any assets that were not my own code until I received an "Invalid Binary" email. I narrowed it down to the hockey SDK (built-in framework) which was causing the problem and not even being used, so I removed it from the project (resolved the issue). The worrying part is that nothing fails on my completion during checkout or submission, and according to github this directory and content hasn't changed in a year, leading me to believe that something has changed on the server side at Apple.

I've seen a lot of posts via google saying that frameworks need a subscription, etc., and when using Xcode 6 and iOS 8, this seems to be the standard, so I assumed it might be something like these lines.

I'm not sure how useful this is since I was building for iOS and this article is for Mac, but HockeyApp explains that in order to distribute to the app store, you need to sign the framework with your own identity here:

http://support.hockeyapp.net/kb/client-integration-ios-mac-os-x/hockeyapp-for-mac-os-x

If anyone has any technical comments on this or why it suddenly changed love for ID, to understand it better.

+3


source to share


5 answers


I've checked a lot of places and there seem to be a few things that iTunes Connect is declining right now. The solution is usually to remove the offending resource from Target -> Build Phases -> Copy Bundle Resources (as @azizus mentions). Unfortunately, Apple doesn't tell you which file is causing this problem in your builds, so you have to hunt for yourself. Here are some elements I've found that will do this:

  • Shell scripts (look for .sh files, although they may have different extensions)
  • Also look out for files that are listed as executable when they shouldn't be. This might be a good place to look for shell scripts that you may have missed.
  • Framework (packages of structures, even .a or .o files - you don't need them as they will be compiled into an executable binary)
  • DocSets (I don't know why, but I found the HockeyApp SDK includes a DocSet package which was the reason for my experience)
  • Sometimes it can happen due to some strange rights question. The rights you have may not be the same as the application in the Security Portal.
  • Watch out for invalid characters in your app name or file name (like wildcards)


This is a pretty broad list, something I did for searching in a search was building an archive and then displaying the contents of the .app in the archive using a finder, sorting by file type. The strange thing is that these files actually exist in the _CodeSignature / CodeResources file.

My own theory as to why this is happening is that Apple made some changes (or makes some changes) due to the Extensions and WatchKit apps. Basically you are including multiple binaries in a packaged IPA (phone app, extension, viewer app). They probably want to make sure you don't include anything else that could potentially be accomplished. Unfortunately, the error message is too vague (actually wrong) for most.

+1


source


It took me 3 days to debug.



In the end it was due to an external map I created (let's call it X), which I imported via carthage. X had its own dependencies which it imported via carthage. To link these frames, it had a path in build settings called Framework Search Paths

set to the location of the frameworks. For some reason, it was this flag in this structure that was causing the problem stated in the questions. I ended up importing X dependencies with Git submodules so I didn't have to set the flag Framework Search Paths

. I exported the framework and manually added it to my project that I was submitting to the AppStore. Then it worked.

+1


source


I contacted HockeyApp and they suggested not adding the SDK to the app bundle. So I went to Target -> Build Phases -> Copy Bundle Resources and removed the HockeySDKResources.bundle from it. iTunes Connect accepted my binary.

0


source


In my case, it was a duplicate info.plist that was not used. (it was not easy to figure out the problem). I deleted almost all of my project files until I deleted this and it worked

0


source


Deleting a value for Code Sign Code resource rules Resolved an issue for each target.

0


source







All Articles