Course contentsShow
← React Native
Lesson 115 of 1,5552. Project Scaffolding with ExpoFree lesson

Customizing Native Manifests

Override standard manifest files to integrate deep links and custom URL schemes.

In this lesson, you will learn how to customize native manifest files in an Expo project to define deep links and custom URL schemes.

The Role of Manifests

When you build a mobile app, the operating system (iOS or Android) needs instructions on how to handle external traffic directed at your application. On Android, this is handled by the AndroidManifest.xml file, and on iOS, by the Info.plist. These files act as the "manifest"—a blueprint that tells the device, "If a user clicks a link with a specific protocol, launch my app."

In an Expo project, we typically avoid editing these files directly. Instead, we use the app.json (or app.config.js) file to "override" or provide instructions that Expo then translates into these native manifest files during the build process.

Implementing URL Schemes

To allow your app to respond to custom URLs (like myapp://profile), you define a scheme in your Expo config. This tells the native build process to register your app as the handler for that specific prefix.

Here is how you define a custom scheme in your app.json:

{
  "expo": {
    "name": "MyProject",
    "scheme": "my-cool-app",
    "ios": {
      "bundleIdentifier": "com.example.mycoolapp"
    },
    "android": {
      "package": "com.example.mycoolapp"
    }
  }
}

By adding the scheme property, Expo automatically updates the native manifest files during the next build. On iOS, it adds the URL type to your Info.plist, and on Android, it injects the necessary <intent-filter> into your AndroidManifest.xml.

Why This Matters

If you want your app to open when a user clicks a link in an email or a website, you must provide this metadata. Without it, the operating system won't know that your app is capable of processing that link, and the click will simply fail to trigger your application. By using the app.json configuration, you maintain a clean, declarative setup that works consistently across both platforms without manually digging into complex native XML or property list files.

Key Takeaway: You customize native manifests in Expo by declaring properties like scheme in your app.json, allowing Expo to automatically inject the necessary instructions into your app's native configuration files during the build process.