Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 9 - Alamofire Pods. Command /bin/sh failed with exit code 1

/Users/Alex/Library/Developer/Xcode/DerivedData/MyProject-ehabmnclpzlywhabrefntacibonm/Build/Intermediates.noindex/ArchiveIntermediates/Fuego/InstallationBuildProductsLocation/Applications//MyProject.app/Frameworks/Alamofire.framework: unknown error -1=ffffffffffffffff
Command /bin/sh failed with exit code 1

I got this issue when I Archive my project. When I run app on simulator it works ok without such issue above.

Also it works ok with Xcode 8, but now when I try to Archive it on Xcode 9 I have this issue. But maybe this is not the case as I reinstall Mac OS from scratch, so it maybe cocopods version issue I am not sure.

Also two // here in the example above is also strange for me /Applications//MyProject.app

like image 413
Matrosov Oleksandr Avatar asked Dec 03 '17 09:12

Matrosov Oleksandr


2 Answers

I believe it's a Xcode's bug. Restart your Mac and try to build again. Xcode would ask permission to access your Keychain before build Alamofire, then just allow it.

like image 58
Duan Nguyen Avatar answered Oct 01 '22 22:10

Duan Nguyen


Hm it's very strange after some search on the Web I found that this is actually signing issue.

I used Xcode to generate new distribution certificate and maybe this leads some problems for me.

What I did to solve my issue.

  1. I removed all certificates on my Mac and in my apple account.
  2. I removed all prov profiles as well on my Mac and in my apple account.
  3. I requested certificate and save it on the disc manually (not via Xcode )
  4. I recreated certificate and profile. Downloaded it manually and double click on it.
  5. After that I faced with keychain issue when I can not enter password to allow signing my certificate. I use this link to move certificate form login to system section.
  6. Finally I get it work.
like image 35
Matrosov Oleksandr Avatar answered Oct 01 '22 22:10

Matrosov Oleksandr