These instructions are provided to help you configure your Expo app to work with this library. When using Expo there are two workflows: managed and bare. The instructions for each are slightly different.
See iOS directions.
Add the following to your Expo app's config file. This file is typically named app.json
, app.config.js
, or app.config.ts
.
"ios": {
"infoPlist": {
"LSApplicationQueriesSchemes": [
"comgooglemaps",
"citymapper",
"uber",
"lyft",
"transit",
"truckmap",
"waze",
"yandexnavi",
"moovit",
"yandextaxi",
"yandexmaps",
"kakaomap",
"szn-mapy",
"mapsme",
"osmandmaps",
"gett",
"nmap",
"dgis",
"lftgpas"
]
}
}
See Android directions.
Utilize the plugin system to add app intent
s to Expo prebuild
step.
const {withAndroidManifest} = require('@expo/config-plugins');
const supportedApps = ['geo', 'waze'];
const mapAppIntents = supportedApps.map((app) => {
return {
action: {
$: {'android:name': 'android.intent.action.VIEW'},
},
data: {
$: {'android:scheme': app},
},
};
});
module.exports = function androidManifestPlugin(config) {
return withAndroidManifest(config, async (config) => {
const androidManifest = config.modResults.manifest;
const existingIntent = androidManifest.queries[0].intent;
androidManifest.queries[0].intent = existingIntent.concat(mapAppIntents);
return config;
});
};
{
"plugins": ["./src/plugins/android-manifest.plugin.js"]
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.app">
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="geo" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="waze" />
</intent>
</queries>
<!-- Rest of Manifest -->
</manifest>
Don't forget to rebuild your app after making these changes.
You can usually do so by running expo build
.
Also note that this will only work when building your own standalone app, not when starting your app through the Expo app in the App Store.