Xcode 清理缓存、 报错积累

Xcode下载地址:

Xcode下载地址

Xcode 清理缓存

  • 删除Xcode中多余的证书provisioning profile
    ~/Library/MobileDevice/Provisioning Profiles
  • Xcode插件的安装路径(可以在这里删除内容来卸载插件)
    ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins
  • 清理Xcode编译项目产生的缓存垃圾,建议定期清理,会重新生成 ~/Library/Developer/Xcode/DerivedData
  • 清除模拟器运行产生的文件,可以清理,运行模拟器会重新生成 ~/Library/Developer/CoreSimulator/Devices/
  • 移除对旧设备的版本支持,建议清理,连接设备会重新生成
    ~/Library/Developer/Xcode/iOS DeviceSupport
  • xcode模拟器存放路径,谨慎,清理后如需要需要自己下载添加 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
  • xcode去除git的版本控制
    Xcode -> preference 选择 sorce control ,去掉Enable source control 的勾

Xcode 错误收集

redefinition of enumerator或者linker command failed with exit code 1 (use -v to see invocation)

包含重复的文件。

编译工程出现 redefinition of classXXX的错,头文件和导入的库都正确,请从Finder里看看整个工程目录下是不是有两个同名的头文件...有的话删除一个。

use of undeclared identifier

头文件错误。

可能是相关的头文件忘记包含进来了。

ld: 'Pods/librtmp-iOS/lib/librtmp.a(rtmp.o)' does not contain bitcode. You must rebuild it with bits

在Xcode 7中,我们新建一个iOS程序时,bitcode选项默认是设置为YES的。我们可以在”Build Settings”->”Enable Bitcode”选项中看到这个设置,设置为NO。如果我们的工程需要支持bitcode,则必要要求所有引入的第三方库都支持bitcode。

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI UTF8String]: unrecognized selector sent to instance 0x17407dac0'

解决:对类型的容错判断做得不够,传入类型错误或提前释放了,看哪句话调用了UTF8String方法排查

duplicate symbol OBJC_CLASS$_PayTableViewCell in:

解决:由于马虎导入了.m文件,改为.h即可

分类:
iOS
标签: