xcode编译错误总结

  1. No architectures to compile for(ONLY_ACTIVE_ARCH=YES   

       这种错误    修改building settings下 Build Active Architecture only 为NO即可。
  2. dyld: Symbol not found: _objc_setProperty_nonatomic    

      _objc_setProperty_nonatomic是ios6.0的新方法,三方库设置了Deployment Target 为6.0就会调用这2个新增的方法,为ios5中没有,我们的项目是支持ios5的。所以报错。把lib的target设置为5.0之后,没有这个错误了

           如果你在使用新浪sdk,使用了libWeiboSDK_X64的库,如果在5.x上运行,也会报这个错,猜测这个版本的库时6.x以下的。换成那个不带_X64的库,没有问题。

    1. 在使用百度统计是,如果出现类似错误

      在buildPhases 下添加coreTelephoney.framework即可

      这个问题,花费了我2天的时间才找到,总以为是自制的静态库的问题。

    2. no provisioning profile at path '/Users/user/Library/MobileDevice/Provisioning Profiles/XXXXX.XXX
       当报这种错误时,工程证书不正确,修改build setting下 的Provisioning Profile为正确的的项目证书即可
    3. malformed or corrupted AST file: iosXXX,类似的错误时,时xcode编译器的问题,清理下/Library/Developer/Xcode/DerivedData下的数据
      即可。
    4. Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-2903.23/UITableViewRowData.m:578

      libc++abi.dylib: terminate_handler unexpectedly threw an exception

      这个错误的原因是在计算tableview的高度是出错,

      对现实的图片UIImage计算高度,但是此时image为nil,做了200/image.size.height这个操作

      导致height += 200/image.size.height,这个计算后,height为NaN,之后报这个错误,

      keychain错误:Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'

       KeyChain内部以kSecAttrAccount 与kSecAttrService作为唯一钥匙串标识,

      传送门 http://stackoverflow.com/questions/4891562/ios-keychain-services-only-specific-values-allowed-for-ksecattrgeneric-key

       
原文地址:https://www.cnblogs.com/shirley-1019/p/4329530.html