Skip to content

MSBuild Permissions

Declare permissions once in your project file and let MSBuild generate the correct Android manifest entries and iOS Info.plist entries automatically. No more editing XML files by hand.

  • GitHub stars for shinyorg/msbuildpermissions
  • NuGet package Shiny.Permissions.MSBuild
Frameworks
.NET MAUI
Operating Systems
Android
iOS
  • Single declaration — add MauiPermission items and both Android + iOS entries are generated
  • 12 built-in presets — BluetoothLE, Location, LocationBackground, Geofencing, Push, Microphone, Contacts, Calendar, Camera, Photos, Maps, Biometric
  • Smart deduplication — shared Android permissions appear only once
  • iOS array merging — background modes from multiple presets consolidate automatically
  • Granular control — add platform-specific entries directly when presets aren’t enough
  • Zero config — installs via NuGet, runs automatically before Build
Terminal window
dotnet add package Shiny.Permissions.MSBuild

Add MauiPermission items to your project file:

<ItemGroup>
<MauiPermission Include="Camera" />
<MauiPermission Include="BluetoothLE" />
<MauiPermission Include="Location" />
<MauiPermission Include="Push" />
<MauiPermission Include="Biometric" />
<MauiPermission Include="Contacts" />
</ItemGroup>
PermissionAndroidiOS
BluetoothLEBLUETOOTH, BLUETOOTH_ADMIN, BLUETOOTH_CONNECT, BLUETOOTH_SCAN, ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATIONUIBackgroundModes (bluetooth-central), NSBluetoothAlwaysUsageDescription
LocationACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION + featuresUIBackgroundModes (location), NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription
LocationBackgroundFOREGROUND_SERVICE_LOCATION, FOREGROUND_SERVICE, ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATIONUIBackgroundModes (location), NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription
GeofencingACCESS_BACKGROUND_LOCATION, ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATIONUIBackgroundModes (location), NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription
PushPOST_NOTIFICATIONSUIBackgroundModes (remote-notification)
MicrophoneRECORD_AUDIONSMicrophoneUsageDescription
ContactsREAD_CONTACTSNSContactsUsageDescription
CalendarREAD_CALENDARNSCalendarsUsageDescription
CameraCAMERANSCameraUsageDescription
PhotosREAD_EXTERNAL_STORAGENSPhotoLibraryUsageDescription
MapsACCESS_FINE_LOCATIONNSLocationWhenInUseUsageDescription
BiometricUSE_BIOMETRICNSFaceIDUsageDescription

Generated files appear in $(IntermediateOutputPath):

FileDescription
AndroidManifest.xmlAndroid permissions and features
Info.plistiOS Info.plist entries
claude plugin add github:shinyorg/skills/shiny-permissions
  1. Open the shiny-permissions skill file and copy its contents
  2. In your repository, create .github/copilot-instructions.md if it doesn't exist
  3. Paste the skill content into that file and save

Copilot will automatically pick up the instructions on your next chat or code completion. You can also use path-specific instructions by placing the file in .github/instructions/ with an applyTo frontmatter pattern.

View Skill
  • Android — Granular manifest permissions and hardware features
  • iOS — Info.plist entries with typed values and arrays