12

I've been browsing Stack for hours in an attempt to try and fix this error, and I've tried everything I can find/think of. I'm submitting an update to an existing app to the App Store, and upon submitting my build, I keep receiving this error:

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.

My app is undoubtedly signed with a distribution certificate, the correct provisioning profile is installed and selected, the profile contains the correct certificate, I've deleted the profile and created a new one in attempt to fix the error, I've reinstalled certificates, restarted Xcode... cleaned the project multiple times, even restarted my system; I'm stumped.

Also: When I do attempt to export the build, even though I've selected to use my provisioning profile and it appears to build with my selected profile, it says it's using "XC [Name of my Profile Here]" provisioning profile. When I check the portal, there's now the profile I created, and a separate profile with the same title with the XC in front of it. Even once I delete this profile on the developer portal, it's recreated? Could this be causing the submission error? Please help.

Brittany
  • 1,359
  • 4
  • 24
  • 63
  • 1
    I hit into a similar issue and the first solution in this question solved it for me: http://stackoverflow.com/questions/29788601/error-itms-90035-xcode Any form of executable script (.sh, .py etc) can cause the issue. In my case I had a few python scripts that were causing the error. – Iain McManus Jun 08 '15 at 03:32
  • @IainMcManus There are no .sh or .py files in my Copy Bundle Resources :/ Though I did upgrade Xcode recently. Not sure why it's giving me grief all of a sudden O_O – Brittany Jun 08 '15 at 22:17
  • 1
    Do you make use of any third party libraries? It also had issues with files that were contained within third party libraries that I was using. – Iain McManus Jun 14 '15 at 10:19
  • @Brittany Have you fix this? What was your solution? Thanks – Libor Zapletal Sep 14 '15 at 14:26
  • @LiborZapletal I have yet to fix this problem (I needed to fix it to submit an app update to the app store, I have yet to do so lol). I built my app prior to iOS8 (not sure why the store is giving me a hard time with submitting the update, or if that has anything to do with it) - if you stumble across a fix, let me know. – Brittany Sep 20 '15 at 20:20
  • Hey I had the same issue. I found ended up working around it. I posted the details here – villy393 May 16 '16 at 12:21

4 Answers4

13

Here is the way I found a script file in the app which caused the error:

  1. Archive the app
  2. Open the archive folder from terminal
  3. Execute the following command grep -r '#!/' *
  4. Review all the files which are returned from the command
  5. Delete all the scripts from Copy Bundle Resources build phase
  6. Profit
Aliaksandr Bialiauski
  • 1,541
  • 20
  • 25
  • 1
    This has helped me identify my issue. All the faulty files belonged to a cocoapod that I wasn't supposed to be shipping to production, so I disabled it :) – Roger Oba Nov 12 '19 at 21:51
  • Review all the files means ? There are some couple of files returned from the command. – Anees May 27 '22 at 12:44
3

I had the same issue. In my case I am including my own frameworks, which has some script files, I removed those script files from the frameworks targets, and the issue went away.

Amr
  • 2,160
  • 1
  • 15
  • 8
1

Now-a-days Xcode has a "Show Log" button.

enter image description here

Tap that and it'll shine some light on the offending framework / script.

enter image description here

In my case, I sometimes forget to remove some debugging Frameworks before making my production build.

Dharman
  • 30,962
  • 25
  • 85
  • 135
capikaw
  • 12,232
  • 2
  • 43
  • 46
0

This issue occurred for me when one of my Cocoapods incorrectly specified the resources in it's podspec so that scripts were inappropriately included.

Updating the suspected podspec to only include resource file types resolved the issue. In this case, I added xcassets to the spec.

s.resources = '<path>/**/*.xcassets'

bradkratky
  • 1,577
  • 1
  • 14
  • 28