xcode7,ios9 部分相容設定

來源:互聯網
上載者:User

標籤:

內容來源廣大的互連網

神奇的蘋果公司,再一次讓程式員中槍。

一、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 部分相容設定

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.