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

ぃ、小莉子 提交于 2019-12-10 14:45:52

问题


/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


回答1:


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.




回答2:


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.


来源:https://stackoverflow.com/questions/47617037/xcode-9-alamofire-pods-command-bin-sh-failed-with-exit-code-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!