0

I've been trying to instal a few apps that I've been developing to my handset. A few of these apps now give me this infamous error

Command /bin/sh failed with exit code 1

This error ONLY happens when trying to install the app to a physical device, everything works perfectly on the simulator. I've googled a solution to this problem and nothing really helps, a lot of people suggest only running shell scripts at launch. This fix doesn't work for me as it still won't install on the phone and then breaks the simulator version of the app.

I've tried clearing the temp files in derived data and that makes no difference.

I've also checked the signing off the app. I'm using both my personal account and a paid account so signing should not be an issue.

Anyone have any suggestions? its really starting to bug me now!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Axemasta
  • 763
  • 1
  • 9
  • 24

2 Answers2

0

Seems to be related to permissions on the mac. When you restart xcode & your mac it should prompt you for permissions to access (I think its keychain but not 100%). I had been using an office phone with an unknown password and had just ignored it causing none of my apps to load onto any device.

Axemasta
  • 763
  • 1
  • 9
  • 24
0

After checking my certificates, restarting Xcode several times, changing file permission with attr command and so on, all of these couldn't solve that error.

I was like going mad, until I saw there was an update for my macOS (High Sierra), after updating (and drinking coffee), I successfully compiled my project again. It than raised another problem, but I fixed that here: https://stackoverflow.com/a/48538225/1012775

So, just because I updated my OS, my problem was solved. Yes it took me half a day.

If other solutions didn't work, try this one, it worked for me.

AndaluZ
  • 1,410
  • 3
  • 15
  • 33