This PR adds an [Expo Config Plugin]() which allows the library to be configured for Expo apps without manually modifying the app.config.js file with specific confoguration. Instead, to set this up, you just need to add the plugin to the list:
{
"name": "my app",
"plugins": ["react-native-email-link"]
}
In the future, if the plugin is updated (for example new querys need to be listed in the info.plist) then Expo users will atuomatically get these changes without needing to manually update their app.config.js.
I have also added the required Android code to the libraries AndroidManifest.xml. This will automatically be merged into the user's AndroidManifest.xml through the Android manifest merging system. This will work for both regualr React Native and Expo users who are using custom development clients.
To test these changes you can see that the correct settings are in the geneated config by adding the libary and plugin to an Expo app and running expo config --type prebuild. You should see the LSApplicationQueriesSchemes in the outputted config without them needing to be listed in the app.config.js manually.
You can also test the manifest merging by updating the library and running ./graldew assembleDebug and looking at the merged manifest in android/app/build/intermediated/merged_manifest/debug/out/AndroidManifest.xml. It should included the required mailto query.
This PR adds an [Expo Config Plugin]() which allows the library to be configured for Expo apps without manually modifying the
app.config.js
file with specific confoguration. Instead, to set this up, you just need to add the plugin to the list:In the future, if the plugin is updated (for example new querys need to be listed in the info.plist) then Expo users will atuomatically get these changes without needing to manually update their
app.config.js
.I have also added the required Android code to the libraries
AndroidManifest.xml
. This will automatically be merged into the user'sAndroidManifest.xml
through the Android manifest merging system. This will work for both regualr React Native and Expo users who are using custom development clients.To test these changes you can see that the correct settings are in the geneated config by adding the libary and plugin to an Expo app and running
expo config --type prebuild
. You should see theLSApplicationQueriesSchemes
in the outputted config without them needing to be listed in theapp.config.js
manually.You can also test the manifest merging by updating the library and running
./graldew assembleDebug
and looking at the merged manifest inandroid/app/build/intermediated/merged_manifest/debug/out/AndroidManifest.xml
. It should included the requiredmailto
query.