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.
Frameworks
.NET MAUI
Operating Systems
Android
iOS
Features
Section titled “Features”- Single declaration — add
MauiPermissionitems 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
dotnet add package Shiny.Permissions.MSBuildMAUI Permissions
Section titled “MAUI Permissions”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>Known Permission Sets
Section titled “Known Permission Sets”| Permission | Android | iOS |
|---|---|---|
| BluetoothLE | BLUETOOTH, BLUETOOTH_ADMIN, BLUETOOTH_CONNECT, BLUETOOTH_SCAN, ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION | UIBackgroundModes (bluetooth-central), NSBluetoothAlwaysUsageDescription |
| Location | ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION + features | UIBackgroundModes (location), NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription |
| LocationBackground | FOREGROUND_SERVICE_LOCATION, FOREGROUND_SERVICE, ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION | UIBackgroundModes (location), NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription |
| Geofencing | ACCESS_BACKGROUND_LOCATION, ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION | UIBackgroundModes (location), NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription |
| Push | POST_NOTIFICATIONS | UIBackgroundModes (remote-notification) |
| Microphone | RECORD_AUDIO | NSMicrophoneUsageDescription |
| Contacts | READ_CONTACTS | NSContactsUsageDescription |
| Calendar | READ_CALENDAR | NSCalendarsUsageDescription |
| Camera | CAMERA | NSCameraUsageDescription |
| Photos | READ_EXTERNAL_STORAGE | NSPhotoLibraryUsageDescription |
| Maps | ACCESS_FINE_LOCATION | NSLocationWhenInUseUsageDescription |
| Biometric | USE_BIOMETRIC | NSFaceIDUsageDescription |
Output
Section titled “Output”Generated files appear in $(IntermediateOutputPath):
| File | Description |
|---|---|
AndroidManifest.xml | Android permissions and features |
Info.plist | iOS Info.plist entries |
AI Coding Assistant
Section titled “AI Coding Assistant”claude plugin add github:shinyorg/skills/shiny-permissions - Open the shiny-permissions skill file and copy its contents
- In your repository, create
.github/copilot-instructions.mdif it doesn't exist - 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.