ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all.

I've been stuggling with this for over a week.


I'm trying to submit the first build to iTunes connect for test-flight. No matter what I do I get the error:


ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. 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"


I finally submitted a technical support incident early this week, and got back a reply with general suggestions:


======

Thank you for contacting Apple Developer Technical Support (DTS) regarding the code signing related issue. You are receiving this response because the issue described in your email was identified by DTS to be covered within this document.


APPLE WORLDWIDE DEVELOPER RELATIONS INTERMEDIATE CERTIFICATE EXPIRATION


The previous Apple Worldwide Developer Relations Certification Intermediate Certificate expired on February 14, 2016 and the renewed certificate must now be used when signing Apple Wallet Passes, push packages for Safari Push Notifications, Safari Extensions, and submissions to the App Store, Mac App Store, and App Store for Apple TV.


Apple Worldwide Developer Relations Intermediate Certificate Expiration

<https://developer.apple.com/support/certificates/expiration/>


All developers should download and install the renewed certificate on their development systems and servers. All apps will remain available on the App Store for iOS, Mac, and Apple TV.


Download and Install the Renewed Intermediate Certificate

<https://developer.apple.com/certificationauthority/AppleWWDRCA.cer>


Important: If you have a copy of the expired WWDR Intermediate certificate in both your System and Login keychains within the Keychain Access application, your certificates may appear as invalid and not be recognized by Xcode. To resolve the issue, in the Keychain Access application, select the System keychain. First select 'Show Expired Certificates' in the View menu, and then type “world” in the search bar, and finally delete the expired versions of the Apple Worldwide Developer Relations Certificate Authority Intermediate certificate. Your certificates should now appear as valid in Keychain Access and be available to Xcode.


CONVERTING TO TEAM BASED CODE SIGNING


If you are not already using Team-based code signing we recommend you convert your project to use it as it makes code signing much easier and less error prone. Team-based signing should be used in Xcode 5 and later: it’s the recommended workflow and is what’s covered in App Distribution Guide. Team based code signing requires resetting of all code signing settings in each targets build settings to their defaults. Xcode will no longer use the Code Signing Identity and Provisioning Profile build settings, but instead choose the best combination of signing identities and provisioning profile for the scheme being built.


Technical Q&A QA1814 - Setting up Xcode to automatically manage your provisioning profiles:

<https://developer.apple.com/library/ios/qa/qa1814/_index.html>


CODE SIGNING TROUBLESHOOTING


The following code signing troubleshooting index first describes the processes you should be following and then lists common code signing problems and their solutions.


Technical Note TN2407 - Code Signing Troubleshooting Index:

<https://developer.apple.com/library/ios/technotes/tn2407/_index.html>




IF YOUR ISSUE PERSISTS


If after reviewing the above document you still have code signing issues, DTS asks you to do the following:


1. Use the Dev Forums - Check to see if a solution exists on the forum, and if not, post the details of your specific issue.


* Dev Forums topic for running iOS apps through Xcode:

Apple Developer Forums / Xcode / iOS Simulator and Devices

<https://forums.developer.apple.com/community/xcode/ios-simulator-and-devices>


* Dev Forums topic for iOS distribution:

Apple Developer Forums / Distribution / App Submission and Review

<https://forums.developer.apple.com/community/distribution/app-submission-and-review>


2. Reply back to this email and include the following screenshots as an attachment.


NOTE: To take a screenshot in Mac OS X, press: Command+Shift+3. Please do not crop the screenshots after they are created.

Please take a screenshot capturing:

1) the error message you are receiving or other problematic behavior

2) the Xcode project > Target > General tab

3) the Xcode project > Target > Build Settings -> Code Signing

4) your current Run Destination, e.g. iOS Device, or Simulator (to do this, click the Scheme pop-up menu in the upper-left corner of the Xcode toolbar)

5) In the Product menu, choose Scheme > Edit Scheme. If you are running your app on device through Xcode, click the Run task and take a screenshot. If you are creating a distribution build, click the Archive task and take a screenshot.

6) Open Keychain Access (in /Applications/Utilities) and click the Category titled Certificates, and then type “iPhone” into the search bar at the top right corner of the window. Take a screenshot.

7) Select your account with Xcode's Preferences menu > Accounts then click View Details… and take a screenshot.


You were not charged for this incident. While a Technical Support Incident (TSI) was initially debited from your Apple Developer Program account for this request, we have assigned a replacement incident back to your account.

====


I've done everything they suggested. I did find that although I already had the new WWDR certificate in my keychain, I also had the old expired one. So I deleted that. I also found some signing keys with the expired certificate so I deleted those and redownloaded them.


I'm still getting the same error, despite numerous re-tries and reboots. I had already searched both the developer forums as well as the usual places via google, and didn't find anything similar except for what looked like a temporary XCode problem last fall. I'm using the latest release XCode.


aI did reply to the email with the requested info and didn't see anything strange anywhere they asked for.


It's now been two days since I replied, and I've heard nothing. Also although theysay they gave me back an incident, my account now shows one less incident than I had before.

Replies

> I did find that although I already had the new WWDR certificate in my keychain, I also had the old expired one. So I deleted that.


I think that process only succeeds if you delete the old first (maybe more than one, so be sure to expand the certs to get them all), then add new. As well, do an 'option-clean build folder' via the product menu in Xcode, w/the option key pressed. Then step thru any offers that Xcode may make to 'fix' issues.


Don't worry about the DTS incident count...it will reset back to two soon enough, so just be patient.

Post not yet marked as solved Up vote reply of KMT Down vote reply of KMT
If you are on React-Native 0.63.3 check the build system.

When I had this problem my Workspace was configured with the New Build System try to use the Legacy Build System.