模擬器是不需要簽名的,今天竟然報(bào)簽名錯(cuò)誤了
報(bào)錯(cuò)信息
Command CodeSign failed with a nonzero exit code
詳細(xì)信息
CodeSign /Users/yoli/Library/Developer/Xcode/DerivedData/test-aigpkmmzosvjhaejgcnaxkhsnbto/Build/Products/Debug-iphonesimulator/test.app (in target: test)
cd /Users/yoli/Desktop/App/test
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
Signing Identity: "-"
/usr/bin/codesign --force --sign - --timestamp=none /Users/yoli/Library/Developer/Xcode/DerivedData/test-aigpkmmzosvjhaejgcnaxkhsnbto/Build/Products/Debug-iphonesimulator/test.app
/Users/yoli/Library/Developer/Xcode/DerivedData/test-aigpkmmzosvjhaejgcnaxkhsnbto/Build/Products/Debug-iphonesimulator/test.app: bundle format unrecognized, invalid, or unsuitable
In subcomponent: /Users/yoli/Library/Developer/Xcode/DerivedData/test-aigpkmmzosvjhaejgcnaxkhsnbto/Build/Products/Debug-iphonesimulator/test.app/Base.lproj
Command CodeSign failed with a nonzero exit code
解決
經(jīng)過一番折騰最后發(fā)現(xiàn)竟然是因?yàn)槲乙肓艘粋€(gè)名為Resources的文件夾,改名后正常,經(jīng)測試黃色文件夾是可以的
image.png
心得
當(dāng)遇到莫名問題的時(shí)候,就是報(bào)錯(cuò)信息和原因不匹配,要試著退回上一個(gè)可運(yùn)行版本,看看做了哪些操作,當(dāng)時(shí)因?yàn)橥瑫r(shí)還在報(bào)個(gè)另外的錯(cuò)誤,所以第一時(shí)間沒有找到解決方案