內容來源廣大的互聯網程序員
神奇的蘋果公司,再一次讓程序員中槍。api
1、xcode7 新建的項目,Foundation下默認全部http請求都被改成https請求.xcode
HTTP+SSL/TLS+TCP = HTTPS服務器
也就是說,服務須要提供https(TLS 1.2)的接口;微信
若是服務不改變,則客戶端info.plist的根<dict>需加下面的鍵值;app
簡單信任全部http服務器
<key>NSAppTransportSecurity</key> <dict> <!--Connect to anything (this is probably BAD)--> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
或者嚴謹的
<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>yourserver.com</key> <dict> <!--Include to allow subdomains--> <key>NSIncludesSubdomains</key> <true/> <!--Include to allow insecure HTTP requests--> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <!--Include to specify minimum TLS version--> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.1</string> </dict> </dict> </dict>
2、xcode7 默認開啓,bitcode(iwatch須要),則會致使部分第三方框架報錯(好比友盟的錯誤)
框架
youmeng/libMobClickLibrary.a(MobClick.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7dom
這是要麼更新庫,要麼能夠在 build setting 中,搜索bitcode,並吧 enable bitcode 設置爲 NOide
3、iOS9安裝企業證書打包的appui
企業證書打包的app,安裝到手機裏面後第一次打開app。不會像之前提示,信任仍是不信任該證書;
這是個時候須要iOS9 設置-》通用-》描述文件-》企業級應用 中信任對應的企業開發者。
4、iOS9 URL Schemes
除了要在項目info URL Types中設置URL Schemes,還須要在info.plist裏面增長可信任的調用app,不然回報以下錯誤
-canOpenURL: failed for URL: "weixin://app/wx9c8771d3c07dfd30/" - error: "This app is not allowed to query for scheme weixin"
-canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "This app is not allowed to query for scheme wtloginmqq2"
info.plist加入(QQ跟微信的schemes)
<key>LSApplicationQueriesSchemes</key>
<array>
<string>mqqbrowser</string>
<string>mqq</string>
<string>mqqapi</string>
<string>mqqopensdkapiV2</string>
<string>weixin</string>
<string>wechat</string>
<string>tencent</string>
<string>QQ</string>
<string>wtloginmqq2</string>
<string>mqqopensdkapiV3</string>
<string>mqqopensdkapiV2</string>
<string>mqqwpa</string>
<string>mqqOpensdkSSoLogin</string>
<string>mqq</string>
<string>mqzoneopensdkapiV2</string>
<string>mqzoneopensdkapi19</string>
<string>mqzoneopensdkapi</string>
<string>mqzoneopensdk</string>
<string>mqzone</string>
<string>wtloginmqq2</string>
<string>mqqopensdkapiV3</string>
<string>mqqwpa</string>
<string>mqqopensdkapiV2</string>
<string>mqqOpensdkSSoLogin</string>
<string>openmobileqq</string>
</array>
5、iPad適配Slide Over 和 Split View
分屏應用最好把純代碼改成stroyboard