Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to edit the info.plist in visual studio?

I need to add keys to the info plist but there is no way to open the file for editing. The xamarin docs state that there should be 3 tabs , one of them being source, which let me manually add keys. Where is that tab?

like image 712
Rob8861 Avatar asked Aug 17 '16 17:08

Rob8861


People also ask

How do I edit info plist?

All you have to do is click on the blue project icon -on top of the left- and go to the “Build Settings” tab, search “Info. plist” and choose “Info. plist File” section. Then change the information of the section from your folder's name.

How do I edit info plist on Mac?

plist file. If you need to edit these items, Control-click (or right-click) Info. plist in the sidebar and select Edit Manually. This allows you to add or edit items in raw XML format.


3 Answers

In visual studio 2017 for Windows

  1. Right click on Info.plist and select "Open With"

    enter image description here

  2. Select "Generic Plist Editor" from the programs list

    enter image description here

  3. Can add/edit keys

    enter image description here

like image 195
rsssssonsss Avatar answered Oct 07 '22 03:10

rsssssonsss


You get the 3 tabs when you are editing the info.Plist in the Xamarin Studio. Below is the screen shot from mac.

Screen shot from Xamarin Studio on Mac

Here is the source tab in which you could manually add keys and it would be converted to corresponding tags.

Source tab

There is no problem in manually editing the info.Plist manually by using a text editor of your choice.

like image 36
Rohit Vipin Mathews Avatar answered Oct 07 '22 04:10

Rohit Vipin Mathews


In Visual Studio at the time being you can open info.plist with any editor and add your keys between the <dict> </dict> tags. An example for camera and gallery permisions:

...
<dict>
...
    <key>NSCameraUsageDescription</key>
    <string>Message for permission to access camera</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>Message for permission to access gallery</string>
...
</dict>
...

More permissions and details here https://blog.xamarin.com/new-ios-10-privacy-permission-settings/

like image 23
Mircea Movila Avatar answered Oct 07 '22 05:10

Mircea Movila