3

enter image description here

I have been trying to test my app on a real device and I keep getting this error. I have tried changing my project to this selected answer already XCode 9.1 Command /bin/sh failed with exit code 1 , but it did not work and I have also deleted my derived data already. I hope someone can help me! Thanks!!

Gina
  • 77
  • 1
  • 11
  • Do you have a developer membership? – matt Mar 20 '18 at 04:37
  • I have an Apple Developer Account yes, but I have not paid the 99 bucks yet. To my understanding I can test apps for free with just an Apple ID – Gina Mar 20 '18 at 04:38
  • Yes, to some extent, but there are severe limits until you pay the $99. You may be hitting those limits. – matt Mar 20 '18 at 04:39
  • Ohh I see...okay. Even though it looks like my frameworks is what is causing the error? Because I am using iOS Charts and that is what this error is hinting at. – Gina Mar 20 '18 at 04:42
  • If you can build for the Simulator it’s hard for me to see why iOS charts would magically prevent you from building for a device. – matt Mar 20 '18 at 04:45
  • True...it has been working fine so far...okay I will talk to the company getting this app tomorrow for them to pay for the membership. Thanks for your help! – Gina Mar 20 '18 at 04:47

1 Answers1

12

If you search around there are a lot of solutions presented to solve this problem. But a few them are outdated or very specific to a certain domain. Recently I ran into the same issue with Charts and Xcode refusing to build to my device with the same error message. The problem you're having has nothing to do with your free developer account but rather with the keychain.

To solve it you'll have to do the following:

  1. Open Terminal and type: security set-key-partition-list -S apple-tool:,apple:,codesign: -s /Users/YOUR_USERNAME/Library/Keychains/login.keychain-db

  2. You'll be prompted for your password. If you enter your password correctly and are repeatedly told it is incorrect go into Utilities -> Keychain Access.

  3. Select and deselect the lock. Enter your password when prompted. Re-enter the command on terminal input your password and then clean/build on Xcode. Everything should work as before.
Anthony Sobo
  • 377
  • 3
  • 4