Samantha Withanage Samantha Withanage - 1 year ago 147
iOS Question

App Crashes when requesting Location in iOs 10

In my application I use to get the location data and send it back to the server. the app worked pretty good in previous versions and it crashes in iOs 10. i'm using Xcode 8. the following message shows in the log.

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

so How can I fix this.

Answer Source

In iOS 10, If you want to access to private data, a significant change is that you must declare ahead of time or your App will crash.

If you are using any of the framework listed below

Contacts, Calendar, Reminders, Photos, Bluetooth Sharing, Microphone, Camera, Location, Health, HomeKit, Media Library, Motion, CallKit, Speech Recognition, SiriKit

You have to declare the description in Info.plist

Here is the full list of Info.plist keys which you have to declare for iOS10.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Apps that are able to communicate with an external accessory must declare the protocols they support in their Info.plist file.

To declare the protocols your app supports, you must include the UISupportedExternalAccessoryProtocols key in your app’s Info.plist file. This key contains an array of strings that identify the communications protocols that your app supports.

Hope it helps..!!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download