Configuring MAUI
The MAUI host is a standard .NET MAUI project, so platform configuration uses the usual MAUI files. Everything below lives in the maui/ directory generated by nap add maui.
Configuring AndroidManifest.xml
Android apps manage permissions, device features, and other settings in AndroidManifest.xml, which is located at maui/Platforms/Android/AndroidManifest.xml.
Read the MAUI Android manifest documentation and the Android Manifest docs to learn more.
Changing the Application ID (Package ID)
The app's Package ID (aka Application ID on Android, Bundle Identifier on iOS) is a single MSBuild property in maui/App.csproj:
-<ApplicationId>com.napacitor.app</ApplicationId>
+<ApplicationId>com.mycompany.myapp</ApplicationId>
Changing the App Name
The display name is the ApplicationTitle property in maui/App.csproj:
-<ApplicationTitle>MyApp</ApplicationTitle>
+<ApplicationTitle>My Awesome App</ApplicationTitle>
Deeplinks (aka App Links / Universal Links)
To enable deeplinking through Android App Links, follow the official Android guide on Adding Android App Links. Android Studio comes with a handy wizard for configuring App Links.
Once configured, the getLaunchUrl() method in the App API will provide any URL the app was launched with, and the 'appUrlOpen' event will fire any time the app receives a new App Link deeplink.
URL Schemes
Your app can respond to custom URLs on launch, making it possible to handle deeplinks and app interactions.
On Android, add an intent-filter to the MainActivity (or a dedicated activity) in maui/Platforms/Android/AndroidManifest.xml:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="com.mycompany.myapp" />
</intent-filter>
On iOS, register the scheme under CFBundleURLTypes in maui/Platforms/iOS/Info.plist.
In these examples, the app responds to URLs with the com.mycompany.myapp:// scheme. To get any custom URL the app may have launched with, see the Deeplinks section above.
Setting Permissions (Android)
In Android, permissions your app will need are defined in AndroidManifest.xml inside of the <manifest> tag, generally at the bottom of the file.
For example, here's what adding Network permissions looks like:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<!-- other stuff -->
</application>
<!-- More stuff -->
<!-- Your permissions -->
<!-- Network API -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
Generally, the plugin you choose to use will ask you to set a permission. Add it in this file.
Configuring Info.plist (iOS)
Info.plist is the main configuration file for iOS apps. It is located at maui/Platforms/iOS/Info.plist. You may need to edit it whenever a plugin requires new settings or permissions.
Read the MAUI iOS Info.plist documentation and Apple's Info.plist key reference to learn more.
Managing Permissions (iOS)
iOS permissions do not need to be specified explicitly like they are in Android. However, iOS requires "Usage Descriptions" to be defined in Info.plist. These settings are human-readable descriptions that will be presented to the end user when permission is requested for a particular device API.
Consult the Cocoa Keys list for keys containing UsageDescription to see the various usage description settings that may be required for your app.
For more information, Apple has provided a guide to Resolving the Privacy-Sensitive Data App Rejection which contains more information on APIs that require usage descriptions.
Setting Capabilities (iOS)
Capabilities are used to enable key features that your app may need. You may need to configure them whenever a plugin requires it.
Unlike other configuration options and usage descriptions, capabilities are not configured in Info.plist. In .NET MAUI they are configured in maui/Platforms/iOS/Entitlements.plist (and referenced by the <CodesignEntitlements> MSBuild property). Read the MAUI entitlements documentation and Apple's capabilities article for more information.