3

I realise that this question has been asked quite a few times already, but I have tried to solve using a lot of the given answers with no luck.

CodeSign /Users/XXXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXXX-blligpejpeysabczydnolvooizok/Build/Products/Debug-iphoneos/XXXXXXXX.app
    cd /Users/XXXXXXXX/Documents/Development/Native/tomhais
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity:     "iPhone Developer: XXXXXXX"
Provisioning Profile: "iOS Team Provisioning Profile: XXXXXX"
                      XXXXXXXX

    /usr/bin/codesign --force --sign XXXXXXXXX --entitlements /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXX-XXXXXXXX/Build/Intermediates/tomhais.build/Debug-iphoneos/XXXXXX.build/XXXXXXX.app.xcent --timestamp=none /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXX-XXXXXXXX/Build/Products/Debug-iphoneos/tomhais.app

/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXX-XXXXXXXX/Build/Products/Debug-iphoneos/XXXXXXXX.app: code object is not signed at all
In subcomponent: /Users/XXXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXXX-XXXXXXXX/Build/Products/Debug-iphoneos/XXXXXXXX.app/0CeadLitir.png
Command /usr/bin/codesign failed with exit code 1

I have tried the following:

  1. Deleted my developer account and added it again
  2. Deleted all the provisioning profiles and re-downloaded them
  3. Checked the key-chain access to make sure that they use system defaults
  4. Checked that my Code Signing is pulling in the right certificates
  5. Deleted the image from resources/ removed it from `Build Phases / Copy Bundle Resources and added it again'
  6. Rebooted the machine
  7. Cursed at the machine

Any further ideas of what I might try?

enter image description here

Linda Keating
  • 2,215
  • 7
  • 31
  • 63

5 Answers5

21

What I found was that having a folder named "resources" in the application bundle will cause code sign to fail. This seems to be an undocumented consequence of some implementation detail of iOS apps or code signing, I think. An empty project with just a resources folder with one random file in it reproduced the issue.

I couldn't easily rename the folder with our shared codebase so my solution was to put my "resources" folder in a parent folder with a different name, and adjust the way our resource path was built.

Tim R.
  • 1,570
  • 2
  • 15
  • 33
  • 3
    That worked, having a folder named "resources" was my problem. Holy crap, XCode is such a mess! I've dug through so many threads on this topic and none of the other solutions worked. – Paul Slocum Jan 11 '19 at 15:54
  • Glad to be of help! – Tim R. Jan 15 '19 at 19:14
  • 1
    OMG, THANK YOU. I cannot believe I was cleaning the build folder before every single build and rebuilding every single file in the project for over a year just because of a folder named 'resources'. – daver May 16 '20 at 05:34
  • Can someone please tell me where I can find this resource folder, I am stuck in this problem since yesterday – pratteek shaurya May 21 '20 at 17:17
  • @pratteekshaurya If this is your issue, it would likely be a "copy bundle resources" build step in the project settings > targets > your app > build phases. The screenshot in this article shows the location in the UI: https://developer.apple.com/library/archive/qa/qa1649/_index.html – Tim R. May 22 '20 at 23:54
  • 1
    Having a called in Tests/packageName/Resources caused this issue for me. – MQLN Jan 05 '22 at 11:59
  • 1
    Same for Swift Package that has a resource that is called Resources mentioned ‍♂️ – heyfrank Apr 03 '23 at 10:36
0

I had the same problem, what resolved it was lock/unlock keychain login as described here: link

Pichirichi
  • 1,440
  • 11
  • 15
0

First, check your code have lots of useless variables and remove them, then then x code top bar product -> clear and build the folder and run

0

I had the same problem and spent about a day by trying all suggestions.

Finally, I have solved the problem.

  1. Close Xcode.
  2. Open "Keychain Access.app", find and remove all "Apple Worldwide Developer Relations Certification Authority".
  3. Login to developer.apple.com and remove development and distribution certificate.
  4. Open Xcode again and check "Automatically manage signing". Then Xcode(should be 11.4.1 or later) will download renewed WWDR certificate automatically and generate development certificate.
  5. Clean project and build.
Max Wang
  • 247
  • 3
  • 16
0

I was working with the ARKit, and the problem appears when I try to convert a .dae element into a .scn after that I try to compile but the non zero exit error appears.
I try everything above but nothing worked for me. But I notice that in the project inside the art.scnassets folder was my new file but without the .snc extension.
So the solution was very simple, I just add the .snc to my file, I Clean My Build Folder from the Product menu in Xcode, I ran it again and that Works for me.

M123
  • 1,203
  • 4
  • 14
  • 31