去除警告心得

作者: zhaok | 来源:发表于2017-07-03 15:19 被阅读216次

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

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" 

相关文章

网友评论

    本文标题:去除警告心得

    本文链接:https://www.haomeiwen.com/subject/xjtzcxtx.html