config-plugins
config-plugins copied to clipboard
feat(react-native-google-signin ): added to config-plugin
Why
react-native-google-signin is not compatible with Prebuild. This plugin allows you to configure react-native-google-signin using Prebuild.
How
I take a look at the other Expo Config Plugins in this repo and copying their implementation.
Test Plan
I tested it locally
- Install react-native-google-signin
- Add configuration
{
"expo": {
"plugins": [
[
"@config-plugins/react-native-google-signin",
{
"serverClientId": "my_serverClientId",
"iosClientId": "my_iosClientId",
"iosUrlScheme": "my_iosUrlScheme"
}
]
]
}
}
- Check Info.plist:
ios/[project_id]/Info.plist
...
<key>CFBundleURLTypes</key>
<array>
...
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>my_iosUrlScheme</string>
</array>
</dict>
</array>
...
<key>GIDClientID</key>
<string>my_iosClientId</string>
...
- Check strings.xml:
android/app/src/main/res/values/strings.xml
<resources>
...
<string name="server_client_id">my_serverClientId</string>
</resources>
- Run
npx expo prebuild --clean