9

Since upgrading to Xcode 8 I cannot run any app on my iPhone. The build fails with error:

error: Task failed with exit 0 signal 11

I can run the apps on the simulators, just not on a device. The full error message:

error: Task failed with exit 0 signal 11 { /usr/bin/codesign '--force' '--sign' '7F49C2A625C8976762BDEA351F8DA88E4F6FED22' '--verbose' '/Users/reshef/Library/Developer/Xcode/DerivedData/testXcode-eltpwhxdshmmlygolxcnsroevmoo/Build/Products/Debug-iphoneos/testXcode.app/Frameworks/libswiftCore.dylib' }

Nishant Bhindi
  • 2,242
  • 8
  • 21
Jacob Reshef
  • 91
  • 1
  • 1
  • 7

11 Answers11

27

Damn Xcode...

After upgrading to High Sierra and Xcode 9, I have spend a lot of time... After combining all the answers here, I solved it in the following way.

  1. Delete the derived data as others said.
  2. Clean the project as others said.
  3. Restart the OS <-- This was the key. Only after a reboot it showed the password popup.
  4. When the popup shows that says xcode wants password to something, type your login password, and DO NOT PRESS ALLOW, but PRESS ALWAYS ALLOW. <- Important!
Damn Vegetables
  • 11,484
  • 13
  • 80
  • 135
  • If I could give you a 50 point bounty I would. I upgraded to Xcode 9.2 yesterday (used 9.2 beta for the last week since I upgrade my iOS 11 devices because of Apple's date issue last weekend) and lost the ability to build only for devices. I found two expired certs - even though the expiration date is in 7 days - regenerated that, deleted the app, cleaned both ways, and *still* had the issue. It was the restart and prompt that cleared things up. Damn Xcode... agreed. –  Dec 08 '17 at 16:02
1

Use automatically manage signing:

Go to Target --> General --> Signing, check the Automatically manage siging.

Yahoho
  • 420
  • 4
  • 9
1

cd /Users/xxx/Library/Developer/Xcode/DerivedData

clean ~

Phil
  • 325
  • 3
  • 7
1

Had the exact same issue. First cleaned the Product then restarted the computer. Worked for me!

1

I found that by deleting my account under preferences and re-adding it, I can usually solve this problem.

  1. Click the Xcode menu and select Preferences...
  2. Select the Accounts tab.
  3. Select your developer account under "Apple IDs"
  4. Click the "-" button at the bottom to remove it.
  5. Add your developer account back with the "+" button.
Chuck Wolber
  • 519
  • 7
  • 15
1

In my case,

  1. Close Xcode.
  2. Clean Derived data.
  3. Open Xcode.
  4. Clean Product.
  5. Run your app.
Ramakrishna
  • 712
  • 8
  • 26
0

Clean the project and clean the build folder.

  • Project->Clean

    Project-> (hold alt) Clean

I have ran into many issues after upgrading and a full clean has fixed them.

TheValyreanGroup
  • 3,554
  • 2
  • 12
  • 30
0

Can you try deleting the app from the device and also deleting the derived directory in Xcode and trying again

Naveen Ramanathan
  • 2,166
  • 1
  • 19
  • 21
  • 3
    I tryed building a new EMPTY project and the results are the same. Device builds fail and Simulator build succeeded. – Jacob Reshef Oct 08 '16 at 19:47
0

Delete the app from the device, then clean the project. It works for me. Hope

Echo.D
  • 1
0

If you still face this issue and you have upgraded to MacOS Sierra. You can look in the keychain and delete a system key named "1". This solved my problem "Task failed with exit 0 signal 5"

Yourange
  • 158
  • 10
0

For me this issue was due to expired certificate. I updated my certificate and provisioning profile and issue got solved.

Martin
  • 846
  • 1
  • 9
  • 23