27

App passes validation

On upload getting error Error itms-90035

"Invalid Signature. Code object is not signed at all. The binary at path [myApp.app/RNGridMenu.o] contains an invalid signature. Make sure you have signed your application with a distribution certificate, not an ad hoc..."

myApp.app/RNGridMenu.o is not anywhere in the project. RNGridMenu.h & RNGridMenu.m only. RNGridMenu has been in the project for over a year now, and even uploaded fine 3 days ago

I have checked

Error ITMS-90035 - Xcode 6.3.1 [Invalid Signature]

Error itms-90035 - Xcode

XCode Error itms-90035 - Invalid signature?

All of which have the same error code but dont address my issue

enter image description here

Community
  • 1
  • 1
JSA986
  • 5,870
  • 9
  • 45
  • 91
  • Check this link I have answered same kind of query there http://stackoverflow.com/questions/29906564/xcode-error-itms-90035-invalid-signature-for-gcmanager-o?noredirect=1#comment47953259_29906564 – Asheesh May 05 '15 at 12:04

13 Answers13

66

I tried out pretty much every solution on SO when debugging this for an app I am submitting, and realized you can get this error in many ways. Here's a summary of what is usually wrong and how to fix it.

1) You didn't select a Provisioning Profile for Distribution with a valid certificate for your PROJECT and TARGETS. Make sure you've selected a valid provisioning profile in your Build Settings for the "Release" option, and verify at developer.apple.com that your Provisioning Profile is still valid. (here: https://developer.apple.com/account/ios/profile/profileList.action)

2) Your Code Signing Identity in Build Settings is a valid one for Distribution. Make sure you've selected one that is valid and it is selected for the "Release" option.

3) Your scheme (can be found via Product -> Scheme -> Edit Scheme) for your execution type needs to be "Release" for your Build Configuration. If you are archiving your app for App Store submission, make sure you have "Release" set for the Archive build type in this window.

4) You have multiple distribution certificates in your keychain access. Try deleting the duplicate certificates from your keychain and then try to submit again.

5) One of the most evil ones.... you have a line of code that begins with "#!" at the top of one of your files, usually a ".sh" or ".py". Recently, Apple seems to be requiring these files to be code signed. Feels like a bug on their side, but for your submission just remove this line! This can happen too if you have ".sh" files besides the build script in your Pod directory.

6) You have duplicate CODE_SIGN_IDENTITY lines in your project.pbxproj file. They might look like this...

"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Distribution";

Delete one of these lines and your file should be able to build correctly again.

7) Refresh the certificates and provisioning profiles in Xcode from your developer account. Xcode -> Preferences ... select your account -> View Details -> Hit the refresh button.

8) The kitchen sink approach: create a new project and load your settings from scratch. Recreate your certificates and provisioning profiles. Never fun, but this has worked for me in a few hopeless situations.

Good luck!

madmanick
  • 1,268
  • 10
  • 10
  • This is to do with `myApp.app/RNGridMenu.o` not being code signed. However no such file exists in the project. only the `RNGridMenu` .h and .m files. In the end I have to remove this library and use a different solution just so I could get past the code sign process. Yet another hoop to jump through – JSA986 Apr 27 '15 at 22:22
  • 8
    Thanks, that was very helpful - I was having problems with Crittercism's dsym_upload.sh file and number 5 pointed me in the right direction. I ended up just excluding the .sh file from the target membership, and that resolved my issue. – Ben Williams Apr 29 '15 at 23:41
  • 5
    Item 5 was the culprit for me. Had gencommonstrings.command file. Just needed to remove it from the "Copy bundle resources" Build Phase. – pstoppani Apr 30 '15 at 19:11
  • 2
    Number 5 was the problem for me too. Thank you so much. You saved me a week of debugging! – tmuecksch May 01 '15 at 20:49
  • 2
    embed_png.sh had a "#!" in it! Your the best, thank you for such a thorough answer! – Jono Tho'ra May 01 '15 at 22:14
  • EXCELLENT ANSWER ! #2 was my culprit :D – Kirk Strobeck May 03 '15 at 21:43
  • Strike that, my error was #5, a bower component brought in to the `www` directory had a file whose first line was `#!` – Kirk Strobeck May 03 '15 at 22:08
  • Number 5 solved my problem, Big THANKSSSSS. It was TestFairy SDK at my side. – iEngineer May 07 '15 at 19:44
  • Also note that Apple is now also frowning upon docset files. If none of these options work for you, try removing any docset files and see if that fixes this issue. – Eric Alford May 08 '15 at 17:39
  • Glad these helped everyone! Hopefully we see Apple patch or throw more specific error messages for these in the next xcode update. – madmanick May 23 '15 at 02:35
  • Number 5 helped me too. I excluded Crittercism's upload script from the target. – Ben Thomas Jun 09 '15 at 22:42
  • I've gotten that error when the entitlements file was missing (.xcent) – Agathe Jun 24 '15 at 23:04
  • Another thing to add is if your app/product name has a special character in it. I had trouble with the '$' character, I also heard '?' will cause it as well. This is the `Packaging/Product Name` in the build settings of the target, not the name of the app in itc. – Hugh Jeffner Jul 27 '15 at 16:11
  • Number 5 for me. Accidentally included a .rb ruby development script as part of the distribution files. – user1220717 Jun 02 '16 at 15:02
  • Great!! So glad this helped all of you, happy hacking! – madmanick Aug 20 '20 at 21:05
6

It seems XCode starting with Version 10.0 (10A255) does not properly sign apps with PRODUCT_NAME containing umlauts like ü (and maybe other non-ASCII chars - but we haven't tested this). This is on macOS 10.13.6 (17G65) with APFS, which might be the reason as well.

It did work with the same macOS version with APFS with an earlier XCode version just fine, so we suspect it's XCode though.

Anyway, the fix is to set PRODUCT_NAME to a string without umlauts...

bk138
  • 3,033
  • 1
  • 34
  • 28
  • Had this same issue with `í` so it looks like it's all non-ASCII chars, changing product name worked as well. – Grant Kamin Jan 11 '19 at 16:09
  • I had the same issue. But figured out that my problem was the letter ş in the product name. By this answer, I changed it to s and solved. – Mert Simsek Sep 23 '19 at 05:50
3

Tried & tested solution:

  1. Copy both RNGrid.m & RNGrid.h to another location
  2. Remove both your RNGrid.m & RNGrid.h and move to trash
  3. Clean and build
  4. Add both RNGrid.m & RNGrid.h files back to the project and Copy it to the destination folder
  5. Clean and build

This solution works for me which is also answered here: Why does one .o file in my project has no Provisioning Profile?

Community
  • 1
  • 1
KarenAnne
  • 2,764
  • 1
  • 28
  • 21
  • Thanks for that, in the end I ended up getting rid of the fies altogether to get it through validation. So wont get chance to test it. – JSA986 May 08 '15 at 09:10
  • @JSA986 I see. So you don't need those files anymore? – KarenAnne May 08 '15 at 10:01
  • Not now due to the fact i had to get rid of them for validation. They were navigation for an app, a new navigation method was used so it could be submitted – JSA986 May 08 '15 at 10:03
1

I had the same problem:

My project is a client which access APIs using a non-standard Auth protocol. I implemented a library for this protocol as a separated project and imported it as a subproject in the client's one. Both projects used AFNetworking as HTTP Client. Also the client and the library uses other non-shared external libs.

This schema worked well until Xcode 6.3: all review submissions were accepted in all the stages. After updating to XCode 6.3.1 my submissions to iTunes where rejected because of unsigned .o files of the AFNetworking lib. After iterating over all the answers without success, I decided to remove the subproject. I moved all the library files to the client project and removed the redundant AFNetworking files. After doing this, the app was approved at iTunes Connect :)

Subproject to project

It worked as a temporal solution. Probably I'll need to use CocoaPods or Carthage to be able to separate the app and the lib again.

badger_cl
  • 255
  • 1
  • 2
  • 10
1

I just had this problem while working on a bindings project for Xamarin.

The library would not bind, so I made a proxy framework which invokes the framework I needed.

It was the self-made proxy framework that were getting the ITMS-90035 error message.

After a few hours of fiddeling around I discovered a mismatch between the framework in the IPA file, and the actual content of my proxy framework.

After countless cleaning/rebuilding of the project, I manged to fix the issue by deleting the Xamarin cache on the Mac.

It is located at ~/Library/Caches/Xamarin.

After I deleted the Xamarin folder, I re-built my bindings project. I were then able to upload my app to TestFlight/AppStore.

Klynk
  • 11
  • 1
  • 3
1

For me the problem was that I had a asset with a non-ASCII character in the filename.

Daniel Tovesson
  • 2,550
  • 1
  • 30
  • 41
0

Check if you have the RNGridMenu.m or .h files into the "Copy Bundle Resources" into the "Build Phases" of your target

dadederk
  • 315
  • 2
  • 11
0

Edit:- As said by tp1033 in comment . Application loader is now deprecated and you will not find it in xcode. But you can use Transporter Utility now to upload your .ipa file.

enter image description here

=================================================

I have tried all the solution which described on Stackoverflow. I have also tried also all possibilities as said by thebhanman in first answer but didn't solved problem.

Solution worked for me :- [Upload with Application Loader]

Don't make .ipa with doing extra process like with Terminal or Itunes etc. make .ipa with xcode in export option and it worked for me.

Step 1 :- Go to Product Archive App in xcode

enter image description here

Step 2 :- select export option

enter image description here

Step 3 :- Select 1st option //-> Save for iosappstore deployment

enter image description here

Step 4 :- Xcode will make .ipa file of your application with date and time folder.

enter image description here

enter image description here

Note :- First Validate your app. If validation successfully done then try this with Application Loader.

enter image description here

I hope this will helpful for some one in future. because i waste 2 days to solve this problem.

Badal Shah
  • 7,541
  • 2
  • 30
  • 65
0

I had the same problem, it was related to asset with a non-ASCII character in the filename as in other answer.

I used this command to find the files that were causing the problem:

LC_ALL=C find . -name '*[! -~]*'

I found it in another answer in this post.

Hope this helps someone.

0

I had this problem in a Unity app that I was resigning from a Developer version to an App Store version. I resigned the app before I resigned the frameworks in the app, thus invalidating the signature of the main app file.

This was easily solved (but not easily found) by resigning the frameworks before the app itself.

Shell script example for resigning an unzipped .ipa file:

/usr/bin/codesign -f -s "<CERTIFICATE NAME>" Payload/myApp.app/Frameworks/* 
/usr/bin/codesign -f -s "<CERTIFICATE NAME>" --entitlements entitlements.plist Payload/myApp.app
frankhermes
  • 4,720
  • 1
  • 22
  • 39
0

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.

0

For me, I have read all answers but what worked for me, when I read the error twice I found that the mistake is one of my files couldn't be signed, which mean the Xcode can't parse that specific file, in my case I have removed this file it was a python file I added by mistake, In your case you maybe need it so try to replace or remove if not needed.

  • My project was Flutter so I have removed it from the android studio then I archived then it works, and don't forget to build ios --release from android studio first before you archive.

  • Also Make sure that the signing certificate is distribution and you have a Elligble provisioning profile for the Distribution certificate.

Signing & Capabilties Image

Build Setting Image

  • Another thing to check your Bundle id must match your certificate & profile and the app name must be accurate also.

Hopefully, It works for you.

K-Soliman
  • 914
  • 7
  • 11
0

If the solutions don't work, try this. worked for me. Delete appstoreconnect apple distribution certificate and re create it. Make a new request from keychain and upload to appstoreconnect.

Hakan Turkmen
  • 119
  • 1
  • 6