Setting iOS permission descriptions in Visual Studio 2017

Jim Bennett | Jul 5, 2018

I spend most of my developer day using Visual Studio for Mac, but occasionally I flip back to Visual Studio 2017 on Windows. Last time I flipped back I tried to build an app that uses the camera and I got stuck on one simple thing - setting the camera usage description.

If you double click on the info.plist file in an iOS app project, it will open in the iOS manifest editor. This editor allows you to set or change a number of settings for your app, such as the bundle identifier, app name or scheme URLs that your app uses. But one thing this editor doesn’t support is setting the usage descriptions.

After a quick chat to some other developers, I found out how to do it (thanks Pierce).

From Visual Studio, right-click on the info.plist file, then select Open With….

From the Open With… dialog, select the Generic PList Editor.

Select the Generic PList editor from the open with dialog

Once the file has been opened, click the + on the bottom row to create a new property. Click the property name to get a drop down showing all the supported properties, then click the one you want.

Selecting the property key

Finally add the description to the Value column.

Setting the property value

Read more about this in the docs.

At the time of writing, the docs are out of date, showing that there is no info.plist editor support in VS on Windows. But worry not, I’ve already submitted a PR against the docs to fix this, so hopefully by the time you read this the docs will be up to date.