Forum Xamarin.iOS

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Info.plist key NSBluetoothPeripheralUsageDescription

sisaackssisaacks Member ✭✭✭✭

Hello

I have an app that can be used in a few ways. If a user does not want to connect to exterior devices, they can still use part of the app. It is my understanding with IOS you have to include the key NSBluetoothPeripheralUsageDescription if the user wants to communicate with exterior devices. However adding this key, the user will always be prompted to turn on bluetooth when the app starts. For a user who does not want to use bluetooth this would be very annoying. Is there a way to add the key dynamically to the Plist?

Also the message that comes up with IOS is not the description associated with my Key in the Plist...which is confusing.

Any help would be much appreciated.

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited February 4

    Is there a way to add the key dynamically to the Plist?

    We can't do it , Info.plist is write protected/read-only.

    If user does not want to use bluetooth at first , he can choose to deny it when permission dialog popup , just enable Bluetooth in Settings when he's going to use it .

    Also the message that comes up with IOS is not the description associated with my Key in the Plist.

    Starting iOS 13, it’s mandatory for developers to specify the Privacy Usage Description for Bluetooth by including NSBluetoothAlwaysUsageDescription in their info.plist file.

    NSBluetoothPeripheralUsageDescription is used to support older iOS versions .


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

Sign In or Register to comment.