Crash以及报错总结

CoreData: Cannot load NSManagedObjectModel.nil is an illegal URL parameterhtml

这是由于在工程中CoreData的命名和AppDelegate中使用的命名不一样形成的,多是本身修改了CoreData文件可是忘记修改AppDelegate中相应的字符串。
将图片中的字符串改为和CoreData文件名同样就能够了。ios

No such file or directory ......swift

找不到某个文件 首先复制文件名 在Build Phases下找
浅白色说明文件找不到了xcode

linker command failed with exit code 1(use -v to see invocation)缓存

文件冲突 左下角搜文件
一般有两种状况 1.有两个相同文件 2.只有一个的时候command+shift+f 搜索 ~~.m 看是否引入.m安全

Application tried to push a nil view controller on targetapp

试图推出空的试图控制器ide

must pass a class of kind UITableViewCell函数

注册方法是否对 打全局断点oop

分区头乱窜

多是view的问题多是frame=头的frame 因此头在相对于tableView偏移的基础上再偏移一次 改成bouns相对于本身
tableView 有本身头试图和尾视图 区的头尾有方法实现能够注册重用池也能够不用重用池[有内存问题不能释放view]

轮播图: 上下滚动时轮播图不走

由于定时器是默认状态下是defaultMode 因此在滚动UITrackingRunLoopMode时好像暂停了同样
在定时器中添加下面一段话:
[[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes];
定时器不参与引用计数 直接置空

真机测试时没法运行。报错以下:

You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library

  • 我用的是Xcode7.1 多是第三方库不兼容。7.0以上默认开启 ENABLE_BITCODE
    三方库编译的时候没有 ENABLE_BITCODE

    解决办法:
    有两种: 1.修改工程设置 2.修改第三方库
    第二种没研究,之后涉及会补充。
    第一种:
    在build setting 中搜索 enable bitcode 修改成NO


    如图

    bitcode参考资料

真机测试 could not find developer disk image

stackoverflow上得答案
我用的是Xcode7.1 手机是9.2 真机的系统太高

解决办法:

  1. 更新Xcode
  2. 或者将 将9.2的文件添加进去 路径 /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
    ![7.1]
    (https://www.dropbox.com/s/dledmlnhb6my5x3/Xcode7.1%E6%96%87%E4%BB%B6%E5%A4%B9.png?dl=1)
    下载地址
修改相对路径

方法:
$(SRCROOT) /AutoLayoutAnimation/EaseUI/EaseUI-Prefix.pch

tableView Crash:

'UITableView (<UITableView: 0x7fd26b090a00; frame = (0 94; 320 568); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7fd26abdc0b0>; layer = <CALayer: 0x7fd26ab4a4e0>; contentOffset: {0, 0}; contentSize: {320, 44}>) **failed to obtain a cell from its dataSource** (<FiestViewController: 0x7fd26954c500>)'
先循环使用了cell,后又建立cell

treating unicode character as whitespace

多是由于空格问题 重写一遍就行了

CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 9.1'

证书问题

1.选择工程->Build Settings -> Code Signing -> Code Signing Identity -> Debug -> Any ios SDK 将选项改成:iPhone Developer
2.从新下载你的证书,或者修改通配符,或者说修改你的appid 。选择工程 -》Bundle Identifier 修改成最新的appid 。形成这种缘由是由于你修改了你的app sdk版本

16/03/26

CUICatalog: Invalid asset name supplied:

项目中搜索UIImage imageNamed:

Local declaration of 'XXX' hides instance variable

由于本地变量跟函数参数变量同名

'invalid nib registered for identifier (cell) - nib must contain exactly one top level object which

检查nib文件内是否拖拽了两个cell 或者其余的什么。

-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "XXXView" nib but the view outlet was not set.'

nib文件与ViewControler没有关联成功
1, 打开nib文件
2, 点击"File's Owner", 按command+4,设置Class为xxxViewControler
3, 按Control+"Files's Owner", 里面有个默认的IBOutlet变量view, 看一下后面有没有作关联,若是没有就拉到下面的View和视图作个关联

今天运行百度鹰眼Demo的时候鹰眼dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from:

按照网上说的删除缓存文件重启仍没办法解决
后来发现问题是没有serviceID AK 及 安全码的问题

[None of the input catalogs contained a matching launch image set named "XXXXX".]

缺什么就Assets.xcassets上右键新建什么就OK啦。

NSUserDefaults报错attempt to insert non-property list object

value的数据是 NULL

if ([Value isEqual:[NSNull null]])
{
Value = @"";
}

-[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]’

NSArray或NSDictionary插入数据为空而形成的

'-[__NSCFString count]: unrecognized selector sent to instance 0x7ff57bee12d0'

快速定位出错位置:采用僵尸断点和全局断点


1

2


-[NSObject(NSObject)doNotRecognizeSelector:]


定位

系统已经设置中文,app内仍提示英文及复制粘贴也为英文

在Supporting Files 中的info.plist 中将 Localization native development region改成China便可

The certificate used to sign "app名" has either expired or has been revoked. An updated ....

证书失效 从新生成

Supported orientations has no common orientation with the application

检查横屏

 



文/Karen_(简书做者) 原文连接:http://www.jianshu.com/p/0ac7813d5d86 著做权归做者全部,转载请联系做者得到受权,并标注“简书做者”。
相关文章
相关标签/搜索