Device Permissions - Bandyer/Bandyer-iOS-SDK GitHub Wiki

Table of contents

Camera and Microphone

Apps that requires access to camera or microphone must be granted access to those devices explicitly by the user before they can access them. Apps using the Kaleyra Video iOS SDK are no exception, however the SDK is going to take care of it for you automatically the first time it needs to access the camera device or the microphone device. Since iOS 10, app developers are required to add a textual usage description that will be added to the system alerts prompted to the user. You must add NSCameraUsageDescription and NSMicrophoneUsageDescription keys with the corresponding strings that will be prompted to the user in your App Info.plist. Beware, starting from iOS 10.0 if you don't provide NSCameraUsageDescription and NSMicrophoneUsageDescription keys in your app's Info.plist file, the system is going to kill your App anytime it tries to access the camera or microphone devices.

This is the only step the SDK requires you to do.

Adding privacy usage descriptions is easy, please follow along the steps below while we guide you to adding the required information to your App.

First open your App .xcodeproj file in the project navigator panel, then select your app target and the Info panel. Your screen should be displaying something like this:

Permissions 1

Then mouse over any property in the "Custom iOS Target Properties", if you look closely, a "plus" and a "minus" icons should have appeared

Permissions 2

Click on the plus icon and from the drop down it has appeared select "Privacy - Camera Usage Description", then in the value column insert a meaningful message that will be displayed to the end user when the app will ask her/him to grant access to hers/his camera. You should now be seeing something like this:

Permissions 3

Now do the same steps selecting "Privacy - Microphone Usage Description" this time. And you should good to go.

Permissions 4

Photo Library

The Bandyer SDK provides a rich set of collaboration features that enables your users to share files with other peers during a call. In order to access the files a user wants to share, the SDK might need the permission to access the user's photo library. The Bandyer SDK makes use of UIImagePickerController, which requires you to add the NSPhotoLibraryUsageDescription key alongside with a localized message into your App Info.plist, if you are targeting iOS 10.0 or below. Failing to do so will result in a runtime crash (on devices running iOS 10.0 or below) when the user triggers an access to hers/his photo library.

Adding the NSPhotoLibraryUsageDescription to your App Info.plist it's an easy task. You should follow the same steps you did before when adding the NSCameraUsageDescription and NSMicrophoneUsageDescription keys to the Info.plist file. A step by step guide follows:

First open your App .xcodeproj file in the project navigator panel, then select your app target and the Info panel. Your screen should be displaying something like this:

Permissions Photo Library 1

Then mouse over any property in the "Custom iOS Target Properties", if you look closely, a "plus" and a "minus" icons should have appeared. Click on the "plus" sign, a focused text field should have appeared, now type "Privacy - Photo Library Usage Description" and in the corresponding value column type in the message that will be prompted to the user when the SDK will try to access hers/his photo library

Permissions Photo Library 2

iCloud

Bandyer collaboration features require iCloud entitlements to be present in your app. If you are targeting iOS 10 or earlier, this is a required step. Otherwise if you don't add this entitlement and your user opens the Bandyer filesharing panel trying to select a file, your app will crash. We cannot check whether the app is properly entitled at runtime, so you must take care of this caveat to avoid runtime crashes. Enabling iCloud entitlements is easy:

First open your App.xcodeproj file in the project navigator panel, then select your app target and the "Signing & Capabilites" panel. Your screen should be displaying something like this:

Permission 5

Click on the "+ Capability" button and from the drop down select "iCloud"

Permission 6

Finally enable the "key-value" storage checkmark, and when prompted select the development team you will be using to sign your app

Permission 7

Push Notifications

If your app relies on the features provided by the CallKit framework, it is highly recommended you also enable VOIP notifications in your app, making it able to receive incoming calls even when your app is not in foreground. At the time of this writing, VOIP notifications don't require you to request explicit permission to the end-user. This is not true for standard push notifications though.