IOS开发常见warning汇总

  • Warning: Scene is unreachable due to lack of entry points and does not have an identifier for runtime access via -instantiateViewControllerWithIdentifier

    • 解释:Storyboard中有View Controller没有入口,运行时不能访问到

    • 解决办法:

      • 查看storyboard中第一个view有没有勾选“Is Initial View Controller”

      • 查看storyboard中有没有孤立的view(即跟其他view没有连线)

  • Warning: Cannot verify client 3000

    • 解释:上传应用时App Store不能验证当前证书。

    • 解决办法:

      • 如果证书已过期,更新后重试

      • 清理本地环境,重新archive

        • Shift+cmd+k

        • Shift+alt+cmd+k

  • Warning: Can't find keyplane that supports type 4 for keyboard iPhone-PortraitTruffle-NumberPad; using 1892650032_PortraitTruffle_iPhone-Simple-Pad_Default

    • 解释:UITextField指定的键盘类型为"Number Pad",每次弹出键盘前都会有此警告。经多方调查,目前定义为IOS的bug. 功能一切正常。

    • 环境:IOS8.0,Xcode7.2

    • 解决办法:

      • 无解

      • 如果模拟器中无法弹出键盘,请检查设置:iOS Simulator -> Hardware -> Keyboard -> Connect Hardware Keyboard

  • Warning: can't load underlying module for "SKPhotoBrowser"

    • 解释:Xcode7.3的一个bug。首次使用CocoaPods安装"SKPhotoBrowser"后,使用语句"import SKPhotoBrowser"导入时会有此警告。该错误也会发生在其他CocoaPods模块。

    • 环境:IOS8.0, Xcode7.3

    • 解决办法:

      • 忽略警告,直接编译即可消除。

  • Warning: Unknown class xxx in Interface Builder file

    • 解释:Story board中指定的class不可见,可能的原因是storyboard中该view controller指定的class使用了错误的module.

    • 环境:IOS8.0, Xcode7.3

    • 解决办法:storyboard中找到该class被引用的view,"Show the identify inspector"->"Custom Class"->"Module" 将module置空,即使用通用module。

  • Warning: ld: framework not found XXXXX

    • 解释:无法连接到特定的framework

    • 环境:IOS8.0,Xcode7.3

    • 解决办法:选择"target"->"General"->"Linked Frameworks and Libraries",将不需要的framwork删除。注意,如果使用cocoapods,这里的target将与Podfile中定义的一致。

  • Warning: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

    • 解释:默认情况下访问网络应该使用HTTPS。如果需要HTTP访问则需要添加配置。

    • 环境:IOS8.0, Xcode7.3.1

    • 解决办法:info.plist中添加属性App Transport Security Settings,该属性为Dictionary. 在该属性下添加子属性Allow Arbitrary Loads,并设置为YES

    • 220548_Z7gM_101347.png

 

 

转载于:https://my.oschina.net/renhc/blog/545808

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值