1、
[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
**(lldb) **
xcode 中访问视频以及图片内容的时候会出现这个崩溃在ios 10 上,因为这些资源都是被设置为私有的资源,所以我们需要相应的设置,和ios的网络请求在ios8 上需要在info.plist 文件里面进行设置;
设置的基本的过程:
拷贝内容如下:
<key>NSPhotoLibraryUsageDescription</key>
<string>此 App 需要您的同意才能读取媒体资料库</string>
<key>NSMicrophoneUsageDescription</key>
<string>此 App 需要您的同意才能读取麦克风资源</string>
<key>NSCameraUsageDescription</key>
<string>此 App 需要您的同意才能读取相机资源</string>
2、
有关的运行的xcode 8 经常会显示一些显示在xcode中:
经常会看到的是subsystem显示一大片:
相应的解决办法可以参考这个链接:
http://www.jianshu.com/p/9b3e5111924f
3、不会自动选择证书以及有账号即可真机调试
选择对应的开发者就好了,一个team,比如是自己的账号
4、 xcode 8 应该会检测出相应的内容是不是可谓null,以前的项目可能会出现的问题;
Nullability specifier 'nullable' conflicts with existing specifier 'nonnull'
ps: 也就是这个参数是不能够为空了的;
我们把定义的为nuable去掉就好了;
reference:
http://stackoverflow.com/questions/29647919/how-to-use-nonnull-and-nullable-objective-c-keywords-in-block-based-api-method
https://github.com/kean/DFImageManager/issues/94
https://github.com/core-plot/core-plot/issues/284
5、出现这个警告:
"Unsupported Configuration: Plain Style unsupported in a Navigation Item"
这个警告:
1、一种是讲UIBarButton Item的样式进行修改;将plain 的样式改为bordered的样式;
2、是将里面的Button进行修改;
6、返回值出现警告;
eg:open popViewController(animated: Bool) -> UIViewController? // Returns the popped controller.
(1)我们经常使用的时候,并没有用变量存储它的返回值,xcode8中会出现警告,我们可以"_=" 的方式,
(2)@discardableResult 关键字声明方法,表示这个方法返回值可以使用或者不使用,都不会出席那警告;
但是,为什么这里的popViewController 方法没有使用这个关键字,我们只能够采用第一种方法了;
Note : 至于为什么xcode中没有使用这个关键字,有待思考;
7、Range 和oc中的NSRange不同,
Range这个和Int类型好像没有关系,初始化也是不是这样子的,它的思想是不一样的,初始化是使用Index类型(eg:0..<2),所以,现在循环也有使用这中结构的类型;
项目中用Range替换掉NSRange的方法;获取的思想也是不一样的;
参考链接
8、字符串获取编码
var removingPercentEncoding: String? { get } // 默认是utf8
若是要使用其他编码可以.utf** ;
eg:
9、
objc[2246]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x10aff8910)** and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x10ad8b210). One of the two will be used. Which one is undefined.**
很多人认为这个不是问题,至于怎么解决有待研究。
参考链接
10、ios 中8 一样的通知测试
eg:如果使用信鸽进行推送,需要相应的配置过程(苹果官方也一样)需要相应的证书;以及开发环境证书;
question:上面的配置都存在了,都没有问题了;
我们如果推送还是不成功,需要查看我们通知的能力是否已经打开;
额外的内容:
通过brew 来安装gcc、gdb
g++已经在mac上默认安装了
png++ 应该就是一个图片处理的库;
http://www.nongnu.org/pngpp/doc/0.2.9/
11、问题:
file:///Users/felix/iosFamilyTree/FamilyTree/DTSMobStreamView.xib:
** warning: Attribute Unavailable: Automatic Preferred Max Layout Width before iOS 8.0**
ps:
这个应该是当前的nib设置为version 8 之前的允许的使用;
12、问题:IB 上的问题:预加载
file:///Users/felix/iosFamilyTree/FamilyTree/Base.lproj/Main.storyboard:
error: IB Designables: Failed to render and update auto layout status for SplashScreen (y9Z-Yd-lOI): The agent crashed
ps:在我们的项目汇总经常会写到有关VCButton这样的组件进行预加载设置空间的圆角等等;xcode 8 上出现了上面的问题,需要在原来的代码中加入下面代码,至于原因,暂时还不清楚;
13、在copy target 的时候常常会出现的问题:
Warning: Multiple build commands for output file /Users/felix/Library/Developer/Xcode/DerivedData/FamilyTree-bnctsxqpqrkchqalkculrphluhoi/Build/Products/Debug-iphonesimulator/Relative.app/TencentOpenApi_IOS_Bundle.bundle
Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'FamilyTree/RelativeInfo.plist'.
就是info.plist 文件是系统启动的时候就会加载,这个时候不用在编译的时候再一次编译,所以会出现警告,应该将它在build phases 中去掉;
参考链接
参考链接
14、问题:
ld: warning: directory not found for option '-L/Users/felix/iosFamilyTree/FamilyTree/WeChatConnect'
这个问题应该是这个文件没有找到,也就是路径错误,可能是在配置的时候路径有问题,这个去掉或者修改;
参考链接
15、关于系统出现的一些子系统内容都会答应出来,我们都知道进行target修改:
ps:这样子我们就可以进行屏蔽掉对应的内容的内容的输出;
参考链接
扩展:这里就会涉及到系统的target的变量了;这里就有了启动的参数设置和环境变量的设置;
ps: 一般是为了调试,
尽量是以“-” 开头;可以设置在启动的时候进行这些参数的清零等等操作;
同样可以修改环境变量,这里都是直接精心配制的,一旦配制,一般的字符串的value都是不可以进行修改的,只可以进行阅读;
参考链接:
https://viktyz.gitbooks.io/iosnotebook/content/Notes/Note_00140_20160205.html 一些可以设置的参数
https://xcoder.tips/yun-xing-shi-huan-jing-bian-liang/
https://developer.apple.com/library/content/technotes/tn2124/_index.html
16、storyBoard上组件实现的问题:组件
这个问题不一定要修改,有时候可以显示,有时候就没有显示;
ios 9 上不能够没有动画,将动画勾上就可以了;或者不修改这个警告
storyboard 到xcode8 上的问题;file:///Users/felix/iosFamilyTree/FamilyTree/Base.lproj/Main.storyboard:
error: IB Designables: Failed to render and update auto layout status for MainController (BYZ-38-t0r): The agent crashed
file:///Users/felix/iosFamilyTree/FamilyTree/Base.lproj/Main.storyboard:
error: IB Designables: Failed to update auto layout status: The agent crashed
file:///Users/felix/iosFamilyTree/FamilyTree/Base.lproj/Main.storyboard:
error: IB Designables: Failed to render and update auto layout status for SplashScreen (y9Z-Yd-lOI): The agent crashed
还有一个可能,就是在使用的代码页面,在代码里面是否引入了这个头文件(oc的代码里面)
也可能是mac上显示的问题;
file:///Users/felix/iosFamilyTree/FamilyTree/Base.lproj/Main.storyboard:
warning: Attribute Unavailable: Disabling segue animation is not available prior to iOS 9.0
在设置为show的情况下,出现显示ios 9 上没有好的权限;
(好像这个问题是直接勾选上animates就可以了)
file:///Users/felix/iosFamilyTree/FamilyTree/Base.lproj/Main.storyboard:
warning: Attribute Unavailable: Only Custom segues support class names prior to iOS 9.0
只有ios 9 才可以自定义segue名字的权限;所以会警告
17、
18、
出现上面的问题,大概是因为我们在ios10 之前的系统上运行的,并且很可能是nib上进行直接拉取关系的,
ps: 所以我们应该进行特殊的处理,判断当前的系统是否为ios10 的时候,再设置对应的接口;
19.bitcode 是苹果官方优化对应的上传的包的代码的一种方式,打包的时候应该尽可能的将它开启,如果有些库较老的时候,有可能是不支持这个bitCode的,所以,这个要进行特殊处理,获取去掉,换新的;
http://www.cocoachina.com/ios/20150818/13078.html
ios 10 上的新特性
http://www.cocoachina.com/ios/20160706/16952.html