iOS10 適配問題-Xcode8,ios10適配-xcode8

來源:互聯網
上載者:User

iOS10 適配問題-Xcode8,ios10適配-xcode8

前段時間升級了Xcode8,整體來說對OC的影響不大,但是還是跳一個坑,消耗了不少時間。這裡總結下遇到的適配問題。

1、許可權問題

  Xcode8 訪問相機、相簿等需要許可權的地方崩潰

  解決辦法:

  在使用私人許可權時,添加Info.plist檔案中添加配置:

下面是各種key,需要哪個添哪個

  NSBluetoothPeripheralUsageDescription

  NSCalendarsUsageDescription

  NSCameraUsageDescription

  NSContactsUsageDescription

  NSHealthShareUsageDescription

  NSHealthUpdateUsageDescription

  NSHomeKitUsageDescription

  NSLocationAlwaysUsageDescription

  NSLocationWhenInUseUsageDescription

  NSMicrophoneUsageDescription

  NSMotionUsageDescription

  NSPhotoLibraryUsageDescription

  NSRemindersUsageDescription

  NSSiriUsageDescription

  NSSpeechRecognitionUsageDescription

  NSVideoSubscriberAccountUsageDescription

  NSVoIPUsageDescription

 

2、回調跳轉問題(openUrl) (PBItemCollectionServicer connection disconnected 友盟第三方登入時 授權後不回調的原因)

  iOS10 openUrl需要在下面方法中進行回調配置:

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options NS_AVAILABLE_IOS(9_0); // no equiv. notification. return NO if the application can't open for some reason

3、應用程式語言英文問題

  解決辦法:

  去掉Use Base Internationalization的勾選

 

4、關於推送問題(我用的是極光推送,iOS10相關配置官方文檔說的很明白,自行修改)

  開啟Push Notifications 開關

 

5、快捷注釋問題

  升級後,使用command+/ 快捷注釋,我出現了下不能使用的問題,但是並沒有做什麼操作(可能是因為重啟),莫名的就能好了(Xcode8.1)。

  還是敲下別人的解決辦法:

  終端命令列輸入:sudo /usr/libexec/xpccachectl

  之後必須重啟電腦

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.