Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 92da318

Browse files
committed
add expo android plugin to readme file
1 parent a81129a commit 92da318

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ React Native SDK for Cryptr Authentication through SSO
77
- [@cryptr/cryptr-react-native](#cryptrcryptr-react-native)
88
- [Summary](#summary)
99
- [Expo integration](#expo-integration)
10+
- [Cryptr Expo plugin for Android](#cryptr-expo-plugin-for-android)
1011
- [Prerequisites](#prerequisites)
1112
- [Android](#android)
1213
- [iOS](#ios)
@@ -32,7 +33,26 @@ React Native SDK for Cryptr Authentication through SSO
3233

3334
## Expo integration
3435

35-
:warning: this is not compatible with Expo Go (neither `link`) and requires a run (`expo run`)
36+
:warning: this is straightforward compatible with Expo
37+
38+
Here is an example of a plugin to be compatible with Expo for Android manifest configuration
39+
40+
### Cryptr Expo plugin for Android
41+
42+
```js
43+
const { withAppBuildGradle } = require("@expo/config-plugins");
44+
45+
module.exports = function withAndroidStrategiesPlugin(config) {
46+
return withAppBuildGradle(config, (config) => {
47+
config.modResults.contents = config.modResults.contents.replace(
48+
"targetSdkVersion rootProject.ext.targetSdkVersion",
49+
'targetSdkVersion rootProject.ext.targetSdkVersion\n manifestPlaceholders = [cryptrDomain: YOUR-DOMAIN, cryptrScheme: "cryptr"]'
50+
);
51+
52+
return config;
53+
});
54+
};
55+
```
3656

3757
## Prerequisites
3858

0 commit comments

Comments
 (0)