Xcode开发代码签名问题

时间:2016-08-22 14:15:16

标签: xcode provisioning-profile

我最近将一个应用从一个帐户转移到另一个帐户。我可以将应用程序提交到App Store并在模拟器中运行它。但是,当我尝试在我的设备上运行它时,我收到此错误:

CodeSign /Users/floydresler/Library/Developer/Xcode/DerivedData/App_for_Dark_Tower-egxiflrzexibnghkjwvtznkhigek/Build/Products/Debug-iphoneos/App\ for\ Dark\ Tower.app
cd "/Users/floydresler/Source Code/App for Dark Tower"
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity:     "iPhone Developer: Floyd Resler (6UFPUB2SE5)"
Provisioning Profile: "Dark Tower Dev"
                  (31912d69-5ec4-4740-a696-81ea06d3f3fb)

/usr/bin/codesign --force --sign 4EA262133AD193D1EB339D5E39FC055053663735 --entitlements  
/Users/floydresler/Library/Developer/Xcode/DerivedData/App_for_Dark_Tower-egxiflrzexibnghkjwvtznkhigek/Build/Intermediates/App\ for\ Dark\ Tower.build/Debug-iphoneos/App\ for\ Dark\ Tower.build/App\ for\ Dark\ Tower.app.xcent --timestamp=none
/Users/floydresler/Library/Developer/Xcode/DerivedData/App_for_Dark_Tower-egxiflrzexibnghkjwvtznkhigek/Build/Products/Debug-iphoneos/App\ for\ Dark\ Tower.app

/Users/floydresler/Library/Developer/Xcode/DerivedData/App_for_Dark_Tower-egxiflrzexibnghkjwvtznkhigek/Build/Products/Debug-iphoneos/App for Dark Tower.app: resource fork, Finder information, or similar detritus not allowed
Command /usr/bin/codesign failed with exit code 1

我尝试过清理,删除派生数据,重新创建开发配置文件但没有任何效果。我做错了什么>

1 个答案:

答案 0 :(得分:0)

xcode CodeSign失败的常见原因是“资源分叉,Finder信息或类似的碎屑不被允许”是设置的附加文件属性,通常是在PNG图像上。

***在重新启动所有文件之前,两次,然后再次,永远不要在您不理解的项目上运行批处理命令。

您可以使用以下方法清理您的PNG:

find /Users/You/Project -name "*png" -exec xattr -v -c '{}' \;

您可以使用以下命令对所有项目文件重复此操作:

find /Users/You/Project -exec xattr -v -c '{}' \;

您可以选择仅在构建的项目而不是源上运行它,方法是在错误列出的目录上运行它,例如,如果错误是:

/Users/me/Library/Developer/Xcode/DerivedData/Project-ervhbywkvwhcpnguqaezmqqsbiqe/Build/Products/Debug/My.app:资源分叉,Finder信息或类似的碎屑不允许

执行命令

find /Users/me/Library/Developer/Xcode/DerivedData/Project-ervhbywkvwhcpnguqaezmqqsbiqe/Build/Products/Debug/My.app -exec xattr -v -c '{}' \;