0PricingLogin
React Native Academy · Lesson

Modifying AndroidManifest and Info.plist

Use withAndroidManifest to add permissions and meta-data elements, and withInfoPlist to add keys like NSCameraUsageDescription, then test on both platforms.

Why These Files Matter

AndroidManifest.xml and Info.plist are the central configuration files for Android and iOS apps respectively. They declare permissions, features, app components, URL schemes, capabilities, and usage descriptions. Third-party native libraries almost always require additions to these files. Without the correct entries, features crash, permissions are denied, and App Store submission fails review.

Anatomy of AndroidManifest.xml

The AndroidManifest.xml has three main sections: uses-permission elements at the top level (declare what the app needs), the application element (app-wide settings like icon, theme, backup), and inside it, activity, service, receiver, and provider elements. Config plugins typically add permissions and meta-data elements to the application or activity.

<!-- Typical AndroidManifest.xml structure -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

  <!-- Permissions at top level -->
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.CAMERA" />

  <application
    android:name=".MainApplication"
    android:label="@string/app_name">

    <!-- meta-data items here -->
    <meta-data android:name="com.google.android.geo.API_KEY"
      android:value="YOUR_KEY" />

    <activity android:name=".MainActivity">
      <!-- intent filters here -->
    </activity>

  </application>
</manifest>

All lessons in this course

  1. What Are Config Plugins and When to Use Them
  2. Writing Your First Config Plugin
  3. Modifying AndroidManifest and Info.plist
  4. Distributing Config Plugins as npm Packages
← Back to React Native Academy