iOS 报错汇总

1. Unknown type name 'class'; did you mean 'Class' 问题解决方法

objectice-c 工程中的类(比如 类 A)使用 C++ 文件时  A.m 文件需要更改为 A.mm  , 而且包含 A.h 的其他类(比如 类 B )的B.m 文件也需要更改为 B.mm 

2. _crc32", referenced from:       _zipWriteInFileInZip in

使用 zip 解压 要导入 libz.tbd 的 framework

3.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.
解决办法:info.plist 文件中 添加字段 App Transport Security Settings (Dictionary) -> Allow Arbitrary Loads (boolean) YES
4. viewWillDisAppear 一定加上 [[NSNotificationCenter defaultCenter] removeObserver:self]; 否则 会出现多次受到通知的情况。([self.navigationController pushViewController:player animated:YES];

5. 界面显示异常 : 把异常处的代码显式的放到主线程中 看看问题是否解决 。 (UIAlertController 不显示)

6. 修改老代码过程中出现 tableview 点击cell 不走代理方法 显示调用 allowsSlection 解决问题。

7. launchScreen 不显示图片  工作需要  经常把以前写的项目改改UI 成为一个新项目,这个过程主要的工作就是更换图片 有一点要注意:新图片最好使用新的名字,否则imageview容易显示错误的图片或者干脆显示不出图片,原因就是在Assets 里删除 item 只是项目中看不到了 其实有时候xcode没有真正的删除。

8. This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.

iphone 上已经装了标示符一样的APP ,删掉老版本 重新安装即可。

9. Attempt to insert non-property list object 报错原因 

NSUserDefault 支持的存储类型有:NSString、 NSNumber、NSDate、 NSArray、NSDictionary、BOOL、NSInteger、NSFloat等系统定义的数据类型。

自己创建的类 是不识别的。

 

10.fir三方平台应用下载失败,没有弹出是否安装的提示框。

原因:1.三方浏览器不支持fir应用下载。

        2. 打包前同伴自动生成描述文件,导致自己的描述文件无效。(这个问题主要出现在自己填写证书描述文件的情况,自动打包应该没有这个问题)。

 

11. 

error: reference to 'machineNumKey' is ambiguous
candidate found by name lookup is 'machineNumKey'
candidate found by name lookup is 'machineNumKey'
candidate found by name lookup is 'machineNumKey'

解决方法:目前来看是没有clean项目引起的问题。

 

12.

'attempt to scroll to invalid index path: <NSIndexPath

collectionview 或是 tableView 的section都是从0开始的,setcontentoffset时不能直接上1。

 

13.error in __connection_block_invoke_2: Connection interrupted

使用UDP时 链接的WiFi 没有链接外网导致。

 

14. Launch Screen.storyboard 加载启动图片不显示问题

将图片放在根目录下就可以加载出来了。

 

15.三方分享登录不回调

检查设置里的 url types 是否设置正确

新浪登录需要检查 授权回调页与取消授权回调页设置的网址与AppDelegate.m代码中设置的

redirectURL 是否一致。

 

16.错误信息不输出

可能是使用了cocoapod但是打开了xcodproj 应该打开 xcworkspace 

 

17. sso pachage or sign error

新浪微博集成登录出现的问题,将APP的Bundle identifier 与 申请的账号设置中的identifier保持一致即可。

 

18.UIbutton setImage 显示蓝色是因为button的type是system类型的,修改文custom类型就可以正常显示了。system类型下setimage方法是被锁定的。

 

19. 证书申请每次都要生成新的申请文件certification.request 。

 

20. NaN: [nan nan]

除以零导致,image 为 nil image width 为零。

posted @ 2016-01-11 11:09  慢慢儿  阅读(783)  评论(0编辑  收藏  举报