我正在尝试对我的第一个应用程序进行代码签名,但我无法对其进行编译,并且不断出现Command /usr/bin/codesign failed with exit code 1
错误
要对该应用进行代码签名,我在以下链接中遵循了教程:
https://ioscodesigning.com/generating-code-signing-files/
我已经检查了钥匙串中是否有重复的证书,清除了“派生数据”,并在构建设置中选择了我的配置文件。我不太了解 Info.plist 和捆绑包,因此其中之一可能是个问题,但我不确定。
我还尝试了以下有关该应用程序签名身份的第一个答案。添加配置文件后,错误来自
CodeSign /Users/myname/Library/Developer/Xcode/DerivedData/See_and_Say-eyscdjurjndlatcstdhogblpvxxb/Build/Products/Debug-iphonesimulator/See\ and\ Say.app
cd "/Users/myname/Desktop/See and Say"
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "-"
/usr/bin/codesign --force --sign - --entitlements /Users/myname/Library/Developer/Xcode/DerivedData/See_and_Say-eyscdjurjndlatcstdhogblpvxxb/Build/Intermediates.noindex/See\ and\ Say.build/Debug-iphonesimulator/See\ and\ Say.build/See\ and\ Say.app.xcent --timestamp=none /Users/myname/Library/Developer/Xcode/DerivedData/See_and_Say-eyscdjurjndlatcstdhogblpvxxb/Build/Products/Debug-iphonesimulator/See\ and\ Say.app
/Users/myname/Library/Developer/Xcode/DerivedData/See_and_Say-eyscdjurjndlatcstdhogblpvxxb/Build/Products/Debug-iphonesimulator/See and Say.app: Is a directory
Command /usr/bin/codesign failed with exit code 1
到
CodeSign /Users/myname/Library/Developer/Xcode/DerivedData/See_and_Say-eyscdjurjndlatcstdhogblpvxxb/Build/Products/Debug-iphoneos/See\ and\ Say.app
cd "/Users/myname/Desktop/See and Say"
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: Certificate Name (5DTU5WC6AS)"
Provisioning Profile: "Provisioning Profile Name"
(bc4a4413-f6da-4433-9525-59daf158ed15)
/usr/bin/codesign --force --sign 1CC2A9F98E64BE37CA2AAFB31DD68558C185C72A --entitlements /Users/myname/Library/Developer/Xcode/DerivedData/See_and_Say-eyscdjurjndlatcstdhogblpvxxb/Build/Intermediates.noindex/See\ and\ Say.build/Debug-iphoneos/See\ and\ Say.build/See\ and\ Say.app.xcent --timestamp=none /Users/myname/Library/Developer/Xcode/DerivedData/See_and_Say-eyscdjurjndlatcstdhogblpvxxb/Build/Products/Debug-iphoneos/See\ and\ Say.app
/Users/myname/Library/Developer/Xcode/DerivedData/See_and_Say-eyscdjurjndlatcstdhogblpvxxb/Build/Products/Debug-iphoneos/See and Say.app: Is a directory
Command /usr/bin/codesign failed with exit code 1
有什么问题吗?
答案 0 :(得分:0)
您的问题可能是由您选择的错误签名引起的
签名身份:“-”
似乎是无效的签名身份
尝试在项目的签名设置中选择有效的签名身份:
目标构建设置->签名