2016-11-30 12 views
0

私のアプリケーションでは、ロケーションデータを取得してサーバーに返信します。以前のバージョンではかなりうまく動いていましたが、iOS 10でクラッシュしました。私はXcode 8を使用しています。次のメッセージがログに表示されます。アプリケーションiOsでロケーションをリクエストするとクラッシュします10

Couldn't find the "com.apple.private.externalaccessory.showallaccessories" entitlement 
[MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/delta/Library/Developer/CoreSimulator/Devices/EE3BD084-BA73-44F6-AD95-BE49BBE838AC/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles 
[MC] Reading from private effective user settings. 

soこれをどのように修正できますか。

+4

** NSLocationWhenInUseUsageDescription **と** NSLocationAlwaysUsageDescription ** .plistファイルのキーを追加しましたか? – Wolverine

+2

あなたのplistにNSLocationWhenInUseUsageDescriptionとNSLocationAlwaysUsageDescriptionを追加しましたか? – Rajat

+1

@Rajat +1同じ考えのため@ – Wolverine

答えて

3

iOS 10では、プライベートデータにアクセスしたい場合は、事前に宣言する必要があるか、アプリがクラッシュするという大きな変更があります。

あなたは

連絡先、カレンダー、リマインダー、写真、Bluetoothの共有、マイク、 カメラ、場所、健康、HomeKit、メディアライブラリ、モーション、CallKit、 の下にリストされているフレームワークのいずれかを使用している場合音声認識、シリキット

あなたがここにのInfo.plist

で説明を宣言する必要がiOS10用に宣言しなければならないInfo.plistキーの完全なリストです。

<!-- Photo Library --> 
    <key>NSPhotoLibraryUsageDescription</key> 
    <string>$(PRODUCT_NAME) photo use</string> 

    <!-- Camera --> 
    <key>NSCameraUsageDescription</key> 
    <string>$(PRODUCT_NAME) camera use</string> 

    <!-- Microphone --> 
    <key>NSMicrophoneUsageDescription</key> 
    <string>$(PRODUCT_NAME) microphone use</string> 

    <!-- Location --> 
    <key>NSLocationUsageDescription</key> 
    <string>$(PRODUCT_NAME) location use</string> 

    <!-- Location When In Use --> 
    <key>NSLocationWhenInUseUsageDescription</key> 
    <string>$(PRODUCT_NAME) location use</string> 

    <!-- Location Always --> 
    <key>NSLocationAlwaysUsageDescription</key> 
    <string>$(PRODUCT_NAME) always uses location </string> 

    <!-- Calendars --> 
    <key>NSCalendarsUsageDescription</key> 
    <string>$(PRODUCT_NAME) calendar events</string> 

    <!-- Reminders --> 
    <key>NSRemindersUsageDescription</key> 
    <string>$(PRODUCT_NAME) reminder use</string> 

    <!-- Contacts --> 
    <key>NSContactsUsageDescription</key> 
    <string>$(PRODUCT_NAME) contact use</string> 

    <!-- Motion --> 
    <key>NSMotionUsageDescription</key> 
    <string>$(PRODUCT_NAME) motion use</string> 

    <!-- Health Update --> 
    <key>NSHealthUpdateUsageDescription</key> 
    <string>$(PRODUCT_NAME) heath update use</string> 

    <!-- Health Share --> 
    <key>NSHealthShareUsageDescription</key> 
    <string>$(PRODUCT_NAME) heath share use</string> 

    <!-- Bluetooth Peripheral --> 
    <key>NSBluetoothPeripheralUsageDescription</key> 
    <string>$(PRODUCT_NAME) Bluetooth Peripheral use</string> 

    <!-- Media Library --> 
    <key>NSAppleMusicUsageDescription</key> 
    <string>$(PRODUCT_NAME) media library use</string> 

    <!-- Siri --> 
    <key>NSSiriUsageDescription</key> 
    <string>$(PRODUCT_NAME) siri use</string> 

    <!-- HomeKit --> 
    <key>NSHomeKitUsageDescription</key> 
    <string>$(PRODUCT_NAME) home kit use</string> 

    <!-- SpeechRecognition --> 
    <key>NSSpeechRecognitionUsageDescription</key> 
    <string>$(PRODUCT_NAME) speech use</string> 

    <!-- VideoSubscriber --> 
    <key>NSVideoSubscriberAccountUsageDescription</key> 
    <string>$(PRODUCT_NAME) tvProvider use</string> 

また、外部のアクセサリと通信することができます

アプリは、彼らがのInfo.plistファイルでサポートするプロトコルを宣言する必要があります。

プロトコルにアプリのサポートを宣言するには、アプリのInfo.plistファイル で UISupportedExternalAccessoryProtocolsキーを含める必要があります。このキーには、アプリケーションでサポートされている 通信プロトコルを識別する文字列が含まれています。

1

後藤アプリ情報ファイルに加え、要件に応じてプライバシーキーを追加しました。

場所: キー:プライバシー - ロケーション常に使用方法説明
値:$(PRODUCT_NAME)場所利用

キー:プライバシー - ロケーションの使用使用方法の説明で
値:$(PRODUCT_NAME)の場所

上記のプライバシーキーを追加してもアプリをクラッシュさせた場合。その後、適切な "機能"

を有効にする:あなたが使用している場合は

プロジェクト " Bluettoth LEアクセサリーを使用" - >機能 - >バックグラウンドモードは - >のBluetooth LEのアクセサリーを使用します。

関連する問題