本文介绍了Xcode 8无法归档“Command / usr / bin / codesign失败,退出代码为1”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在macOS Sierra上的Xcode 8上遇到了严重的问题。 当我尝试构建我的应用时,我遇到以下问题。
I've got a serious problem on Xcode 8 on macOS Sierra. when I try to build my app, I get the following issue.
CodeSign /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Products/Debug-iphonesimulator/MyApp.app cd /Users/me/Desktop/MyAppFolder1/MyAppFolder2/MyAppxcode export CODESIGN_ALLOCATE=/Users/me/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate export PATH="/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" Signing Identity: "-" /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, Finder information, or similar detritus not allowed Command /usr/bin/codesign failed with exit code 1然后我确实 forums.developer.apple/thread / 48905 在终端中如下并且有效。但是一旦我清理,问题就会回来。
then I did forums.developer.apple/thread/48905 in the terminal as the following and it worked. but once I clean, the issue comes back.
cd /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Products/Debug-iphonesimulator/MyApp ls -al@ * xattr -c *此解决方案不适用于存档,但存在以下问题。是有它的任何解决方案?
and this solution doesn't work for archive with the following issue. is there any solution for it?
CodeSign /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app cd /Users/me/Desktop/MyAppFolder1/MyAppFolder2/MyAppxcode export CODESIGN_ALLOCATE=/Users/me/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate export PATH="/Users/me/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Users/me/Downloads/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" Signing Identity: "iPhone Developer: My Name (**********)" Provisioning Profile: "iOS Team Provisioning Profile: com.**********.*********" (********-****-****-****-************) /usr/bin/codesign --force --sign **************************************** --entitlements /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Intermediates/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/MyApp.app.xcent --timestamp=none /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Intermediates/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app: resource fork, Finder information, or similar detritus not allowed Command /usr/bin/codesign failed with exit code 1推荐答案
我在Apple论坛找到了这个解决方案
I found this solution in the Apple forum
cd ~/Library/Developer/Xcode/DerivedData xattr -rc .或
xattr -rc ~/Library/Developer/Xcode/DerivedData更多推荐
Xcode 8无法归档“Command / usr / bin / codesign失败,退出代码为1”。
发布评论