iOS开发调试之报错:Command /usr/bin/codesign failed with exit code 1

问题背景

在调试的时候加入了一些图片资源,然后发现就编译不通过了

问题处理

  • 问题描述
/Users/kodie/Library/Developer/Xcode/DerivedData/grwy-drmzoxzoscbscsfjvnllkywknoyt/Build/Products/Debug-iphonesimulator/grwy.app: replacing existing signature
/Users/kodie/Library/Developer/Xcode/DerivedData/grwy-drmzoxzoscbscsfjvnllkywknoyt/Build/Products/Debug-iphonesimulator/grwy.app: bundle format unrecognized, invalid, or unsuitable
In subcomponent: /Users/kodie/Library/Developer/Xcode/DerivedData/grwy-drmzoxzoscbscsfjvnllkywknoyt/Build/Products/Debug-iphonesimulator/grwy.app/Base.lproj
Command /usr/bin/codesign failed with exit code 1
  • 问题截图
image.png
  • 问题解决

是由于我导入的时候采用的是以下这种正常的资源方式,然后最外层文件夹的名字为Resources,然后就出问题了

iOS开发调试之报错:Command /usr/bin/codesign failed with exit code 1_第1张图片
Snip20180824_6.png

后来经过多方试错,才知道这个是文件夹的名字可能和系统的冲突了,然后导致系统内部的资源无法找到,就不能正常签名,所以以后放置资源的路径最好不要和系统(也可以是存在相同的名字的资源路径)的起冲突...

附录

网上查找的解决办法:虽不适用我的场景,但还是贴出来:

Xcode编译错误:code object is not signed at all
XCode编译报错 Command /usr/bin/codesign failed with exit code 1
# Code Sign Error in macOS High Sierra Xcode - resource fork, Finder information, or similar detritus not allowed

Xcode 真机测试报错 证书问题:Command /usr/bin/codesign failed with exit code 1
关于"Command /usr/bin/codesign failed with exit code 1"的解决办法

以上!!!


iOS开发调试之报错:Command /usr/bin/codesign failed with exit code 1_第2张图片
Trump.jpg

你可能感兴趣的:(iOS开发调试之报错:Command /usr/bin/codesign failed with exit code 1)