Xcode编译错误 SigningIdentity: "-"

CodeSign/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Products/Debug-iphonesimulator/MyApp.app

cd/Users/me/Desktop/MyAppFolder1/MyAppFolder2/MyAppxcodeexportCODESIGN_ALLOCATE=/Users/me/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocateexportPATH="/Users/me/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Users/me/Downloads/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

SigningIdentity: "-"

/usr/bin/codesign--force--sign---timestamp=none/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Products/Debug-iphonesimulator/MyApp.app/Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Products/Debug-iphonesimulator/MyApp.app:resource fork,Finderinformation,orsimilar detritusnotallowedCommand/usr/bin/codesign failedwithexitcode1

加了几张图片之后编译就出现了类似上面的错误(以上错误提示是stackoverflow:https://stackoverflow.com/questions/39449665/xcode-8-cant-archive-command-usr-bin-codesign-failed-with-exit-code-1/40128180),搞了半天终于在这里找到了解决方法,原来是UI做图片时把一些扩展信息也保存下来了,使用以下指令清除一下扩展信息就好。

先清掉模拟器的,因为刚build过;

cd ~/Library/Developer/Xcode/DerivedData

xattr -c*

最后最好也cd到你放图片的文件夹执行一下

xattr -c*

clean一下在build就好了。

你可能感兴趣的:(Xcode编译错误 SigningIdentity: "-")