去除警告心得

常见的和普通的去除方法就不写了,网上有很多,写点遇到的小众问题。

1.Conflicting return type in implementation of 'supportedInterfaceOrientations': 'UIInterfaceOrientationMask' (aka 'enum UIInterfaceOrientationMask') vs 'NSUInteger' (aka 'unsigned long')
解决:

#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000  
- (NSUInteger)supportedInterfaceOrientations  
#else  
- (UIInterfaceOrientationMask)supportedInterfaceOrientations  
#endif  
{
    return UIInterfaceOrientationMaskPortrait;
}

2.'interfaceOrientation' is deprecated: first deprecated in iOS 8.0
解决:

self.interfaceOrientation
改成
[[UIApplication sharedApplication] statusBarOrientation]

3.pod 'UMengSocialCOM', '~> 5.2.1'命令重新安装友盟社会化组件.编译出现警告:
object file (Pods/UmengSocialCOM/Umeng_SDK_Social_iOS_ARM64_5.2.1/UMSocial_Sdk_Extra_Frameworks/AlipayShare/libAPOpenSdk.a(APOpenAPIObject.o)) was built for newer iOS version (8.1) than being linked (8.0)
解决:

Targets->Build Settings -> Other linker flags 里边添加-w即可

4.Cannot find protocol definition for 'TencentSessionDelegate'

在TencentOAuth.h类中#import "TencentApiInterface.h" 
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容