標籤:
內容來源廣大的互連網
神奇的蘋果公司,再一次讓程式員中槍。
一、xcode7 建立的項目,Foundation下預設所有http請求都被改為https請求.
HTTP+SSL/TLS+TCP = HTTPS
也就是說,服務需要提供https(TLS 1.2)的介面;
如果服務不改變,則用戶端info.plist的根<dict>需加下面的索引值;
簡單信任所有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>
二、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 armv7
這是要麼更新庫,要麼可以在 build setting 中,搜尋bitcode,並吧 enable bitcode 設定為 NO
三、iOS9安裝企業認證打包的app
企業認證打包的app,安裝到手機裡面後第一次開啟app。不會像以前提示,信任還是不信任該認證;
這是個時候需要iOS9 設定-》通用-》描述檔案-》企業級應用 中信任對應的企業開發人員。
四、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加入
<key>LSApplicationQueriesSchemes</key>
<array>
<string>urlscheme</string>
<string>urlscheme2</string>
<string>urlscheme3</string>
<string>urlscheme4</string>
</array>
五、iPad適配Slide Over 和 Split View
分屏應用最好把純程式碼改為stroyboard
xcode7,ios9 部分相容設定