iOS9要求App内访问的网络必须使用HTTPS协议。原有的HTTP请求会报错,适配方法如下。

打开TARGETS-Build Phases, 添加New Run Script Phase,代码如下:

# Add exception for Debug builds
if [ "${CONFIGURATION}" == "Debug" ]
then
# Remove exception existing builds
/usr/libexec/PlistBuddy -c "Delete :NSAppTransportSecurity:NSAllowsArbitraryLoads" "${CONFIGURATION_BUILD_DIR}/${INFOPLIST_PATH}"
exitCode=$? #Supresses failure /usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity:NSAllowsArbitraryLoads bool true" "${CONFIGURATION_BUILD_DIR}/${INFOPLIST_PATH}"
fi

其中"${CONFIGURATION}" == "Debug"的Debug替换为相应编译环境即可

最新文章

  1. 三、saltstack证书管理
  2. linux- svn服务器
  3. Unity3D 判断鼠标是否按在UGUI上
  4. 检测是否安装了 .NET Framework 3.5
  5. 测试php页面执行代码时间
  6. 【USACO 2.1.5】海明码
  7. js到记时代码
  8. [SignalR]在非Hub继承类中使用脚本方法
  9. .net core 单元测试小记
  10. ●BZOJ 2329 [HNOI2011]括号修复.cpp
  11. Java基础 -- String,StringBuilder,StringBuffer三者的区别
  12. OpenResty安装使用教程(CentOS 6)
  13. github 推送代码
  14. UIImage常用封装
  15. PHP入门(一)
  16. ElasticSearch(十):springboot集成ElasticSearch集群完成数据的增,删,改
  17. 在rhel6上安装Python 2.7和Python 3.3
  18. leetcode 84. 柱状图中最大的矩形 JAVA
  19. Zip文件格式
  20. maven <repositories>标签,<pluginRepositories>标签

热门文章

  1. POJ 2752 Seek the Name, Seek the Fame(KMP中next的理解)题解
  2. miRNA几大常用的数据库
  3. sublime+LatexTools引用参考文献
  4. Python day5_tuple元祖的常见方法1_笔记
  5. F4+2 团队项目软件设计方案
  6. Codeforces 899E - Segments Removal
  7. Codeforces 614E - Necklace
  8. Ubuntu 16.04下docker ce的安装
  9. dd 命令常用功能收集(ing...)
  10. Hive之 Python写UDF