iOS 9变化的特性

  • http请求的变成了https

在Info.plist中添加NSAppTransportSecurity类型Dictionary

在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

  • 汉字转Url码问题
1 NSString *urlStr = [NSString stringWithFormat:kImgHeadUrl,self.img[i]];
2 //iOS9之前可以用下面代码将汉字转化为Url码
3 //urlStr = [urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
4 //iOS9.0之后,上面的方法禁用了,可以用下面的代替
5 urlStr = [urlStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
  •  pod install卡住问题(这个不是因为iOS 9)

换成pod install --verbose --no-repo-update



posted @ 2015-09-24 10:20  Xiao...Xiang  阅读(136)  评论(0)    收藏  举报