【发布时间】:2017-01-19 20:28:19
【问题描述】:
我在 macOS Sierra 上的 Xcode 8 上遇到了一个严重问题。 当我尝试构建我的应用程序时,我遇到了以下问题。
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
然后我在终端中执行了https://forums.developer.apple.com/thread/48905,如下所示,它起作用了。但是一旦我清理干净,问题又回来了。
cd /Users/me/Library/Developer/Xcode/DerivedData/MyApp-gnoiiwnelmxzdidnijaswisrwdqe/Build/Products/Debug-iphonesimulator/MyApp
ls -al@ *
xattr -c *
并且此解决方案不适用于具有以下问题的存档。有什么解决办法吗?
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
【问题讨论】:
-
你找到解决办法了吗?我大约 2 周前下载了 Xcode 8,并用它签署了同一个应用程序。几天前我安装了 macOS Sierra(我之前有 El Capitan),现在它没有签署同一个应用程序。
-
这里也一样,这让我发疯了。只有当我有一个使用 CocoaPods 的项目时才会发生这种情况。
-
@noisedan 这里没有 CocoaPods,也有问题。我不认为它与豆荚有关。但它似乎是项目特定的。例如,这发生在我没有 pod 的 macOS 应用程序上,但我有一个带有 pod 的 iOS 应用程序并且它的签名完美。
-
在此处查看 TimeVision 响应,为我工作forums.developer.apple.com/thread/48905
-
@noisedan 它解决了我在调试版本上的问题,但现在我遇到了与 OP 完全相同的问题:当我尝试存档时它失败了(我必须这样做才能提交给应用程序商店)
标签: ios xcode macos build archive