Skip to content

feat(react-native-google-signin ): added to config-plugin#226

Open
heryTz wants to merge 2 commits intoexpo:mainfrom
heryTz:herytz/react-native-google-signin
Open

feat(react-native-google-signin ): added to config-plugin#226
heryTz wants to merge 2 commits intoexpo:mainfrom
heryTz:herytz/react-native-google-signin

Conversation

@heryTz
Copy link

@heryTz heryTz commented Feb 23, 2024

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

  1. Install react-native-google-signin
  2. Add configuration
{
  "expo": {
    "plugins": [
      [
        "@config-plugins/react-native-google-signin",
        {
          "serverClientId": "my_serverClientId",
          "iosClientId": "my_iosClientId",
          "iosUrlScheme": "my_iosUrlScheme"
        }
      ]
    ]
  }
}
  1. 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>

...
  1. Check strings.xml: android/app/src/main/res/values/strings.xml
<resources>
  ...
  <string name="server_client_id">my_serverClientId</string>
</resources>
  1. Run npx expo prebuild --clean

@heryTz heryTz changed the title Herytz/react native google signin feat(react-native-google-signin ): added to config-plugin Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants