45

ios xcode警告和错误汇总

 5 years ago
source link: http://www.cocoachina.com/ios/20190409/26762.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

1.相同具有外部链接的静态变量

可能是文件重复,两个类当中都声明了具有相同名字的具有外部链接的静态变量。

vQzUruq.jpg!web

由于枚举类型导致的1 duplicate symbol for architecture x86_64错误

解决方法。先看加入东西就开始报错的代码。实在找不到就把类先全部注释,然后一步一步排查。

  • iOS7.0以下『containsString』报 __NSCFString containsString:]: unrecognized selector sent to instance在要使用的时候导入#import "NSString+Extension.h" 的扩展即可

- (BOOL)containsString:(NSString *)aString NS_AVAILABLE(10_10, 8_0){
     if ([self rangeOfString:aString].location != NSNotFound) {
        return YES;
     }
     return NO;
}

2.去掉Xcode工程中的某种类型的警告

网址链接

3.类的名字重复

RJZjM3v.png!web

4.路径删除了

reQjiyY.png!web

解决方式

3EZJvmJ.png!web

5.在工程中不存在或者移动了位置。   文件夹当中有!!!

JvuUBz2.jpg!web

6.分享SDK

6nQN3uz.png!web
  • 解决方式

    mqaMRj3.png!web

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK