Xcode7.0
来源:互联网 发布:u盘格式化怎么恢复数据 编辑:程序博客网 时间:2024/06/05 13:21
1. 自己公司的项目,自己电脑升级IOS9.0之后,出现的问题.请访问这个网址: http://mobile.51cto.com/anews-493604.htm
报错:
Oct 2 09:01:06 SYLShops[602] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Oct 2 09:01:06 SYLShops[602] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Oct 2 09:01:06 SYLShops[602] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
2015-10-02 09:01:36.965 SYLShops[602:14256] ===0
2015-10-02 09:01:37.025 SYLShops[602:14256] ===0
2015-10-02 09:01:37.081 SYLShops[602:14873] 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.
2015-10-02 09:01:37.261 SYLShops[602:14256] Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0x7fe39a631490 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSErrorFailingURLStringKey=http://api.liwushuo.com/v2/item_categories/tree, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., NSErrorFailingURLKey=http://api.liwushuo.com/v2/item_categories/tree}}, NSErrorFailingURLStringKey=http://api.liwushuo.com/v2/item_categories/tree, NSErrorFailingURLKey=http://api.liwushuo.com/v2/item_categories/tree, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.}
2015-10-02 09:01:37.261 SYLShops[602:14256] 请求失败
2015-10-02 09:01:37.262 SYLShops[602:14256] Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0x7fe39c8889b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSErrorFailingURLStringKey=http://api.liwushuo.com/v2/item_categories/tree, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., NSErrorFailingURLKey=http://api.liwushuo.com/v2/item_categories/tree}}, NSErrorFailingURLStringKey=http://api.liwushuo.com/v2/item_categories/tree, NSErrorFailingURLKey=http://api.liwushuo.com/v2/item_categories/tree, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.}
2015-10-02 09:01:37.262 SYLShops[602:14256] 请求失败
2015-10-02 09:01:37.530 SYLShops[602:14256] Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0x7fe39a4b39f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSErrorFailingURLStringKey=http://api.liwushuo.com/v2/items?gender=1&generation=0&limit=50&offset=0, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., NSErrorFailingURLKey=http://api.liwushuo.com/v2/items?gender=1&generation=0&limit=50&offset=0}}, NSErrorFailingURLStringKey=http://api.liwushuo.com/v2/items?gender=1&generation=0&limit=50&offset=0, NSErrorFailingURLKey=http://api.liwushuo.com/v2/items?gender=1&generation=0&limit=50&offset=0, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.}
2015-10-02 09:01:37.531 SYLShops[602:14256] 请求失败
1. 先解决 Error Domain=NSURLErrorDomain Code=-1022
Add a new item NSAppTransportSecurity in plist file with type Dictionary, then add sub item NSAppTransportSecurity in dictionary of type Boolean, and set bool value YES. This work for me, hope works for you guys...Cheers!
网址: http://segmentfault.com/a/1190000002933776
2. 解决CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. 问题
Had this still in XCode 7 GM, iOS9 GM. But, check it out: Set UIViewControllerBasedStatusBarAppearance to YES (even though the status bar is hidden, which is why I set it to NO to begin with), and the warnings go away. Crazy!
以上两个操作都是在plist文件中添加的.
3.
NSURLSession
/
NSURLConnection
HTTP load failed (kCFStreamErrorDomainSSL, -9802)
http://www.360doc.com/content/15/0922/09/110467_500641467.shtml NSAppTransportSecurity,NSExceptionDomains,NSIncludesSubdomains,NSExceptionRequiresForwardSecrecy,NSExceptionAllowInsecureHTTPLoads
4. 首页出现问题 ...
4.1 开始加载的时候中间的东西出不来, 刷新之后顺序错乱
解决方案:把注册的方法写到header和footer判断的代理里面就好了,原因是:可能在开始的重复注册,后面注册冲掉了前面的注册标记.
4.2 重复刷新之后,item不能点击
在header头部的类里面重写-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event方法就ok了
5. 状态栏设置为白色之后,他开始的时候还是黑色
在general中把status bar style 设置为light
设置plist文件 Status Bar Style 设置为NO
[[UIApplicationsharedApplication]setStatusBar:UIStatusBarStyleLightContent];
iOS9之后:
在general中把status bar style 设置为light
设置plist文件 Status Bar Style 设置为YES
重写下面代理方法
- (UIStatusBarStyle)preferredStatusBarStyle
{
returnUIStatusBarStyleLightContent
}
6. iOS8之后, 图标上面显示消息数量的时候,需要添加一下代码才不会报警告.
if ([[[UIDevicecurrentDevice]systemVersion]floatValue] >=8.0)
{
UIUserNotificationType myTypes =UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeAlert |UIRemoteNotificationTypeSound;
UIUserNotificationSettings *settings = [UIUserNotificationSettingssettingsForTypes:myTypescategories:nil];
[[UIApplicationsharedApplication]registerUserNotificationSettings:settings];
}
//在图标上显示所有未读数
[UIApplicationsharedApplication].applicationIconBadgeNumber = result.totalCount;
- Xcode7.0
- xcode7
- Xcode7.0~Xcode7.2.1官方离线下载包
- xcode7.0真机测试
- Xcode7.0代码折叠功能
- xcode7.0请求变更解决方案
- xcode7.0https安全协议
- swift Tips(version2.0+ xcode7.0+)
- Xcode7.0(7A220) 安装离线文档
- XCode7.0 Objective-C 三大新特性
- xcode7.0 打包是报错处理
- Xcode7.0无法找到category的解决方法
- [iOS]Xcode7.0关闭Bitcode编译
- xcode7.0之后各版本下载地址
- Xcode7.0之后, 设置允许HTTP请求
- Xcode7.0免证书真机调试
- Xcode7.0免费真机IOS调试解决方案教程
- xcode7.0 下COCOS2DX编译MAC下出错
- Eclipse中设置编码格式为UTF-8
- ocp-71
- 别再挥霍你30岁前的时光,警惕职场“35岁现象”
- Android应用启动界面的实现方法
- ocp-72
- Xcode7.0
- ocp-73
- Android开发--CardView使用
- spring boot实战(第五篇)配置源码解析
- IOS开发笔记-01按钮操作-08.git的简单使用
- ocp-74
- ocp-75
- Unity mesh 合并
- ocp-76