Skip to content

Commit 32911ef

Browse files
authored
fix: use public api instead of private in expo config plugin (#1496)
1 parent e7eb477 commit 32911ef

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
![React Native Google Sign In](img/header.png)
22

3-
<p align="center">
4-
<a href="https://www.npmjs.com/package/@react-native-google-signin/google-signin"><img src="https://badge.fury.io/js/@react-native-google-signin%2Fgoogle-signin.svg" alt="NPM Version"></a>
5-
</p>
3+
[![npm version](https://img.shields.io/npm/v/@react-native-google-signin/google-signin.svg)](https://www.npmjs.com/package/@react-native-google-signin/google-signin)
4+
[![npm downloads](https://img.shields.io/npm/dm/@react-native-google-signin/google-signin.svg)](https://www.npmjs.com/package/@react-native-google-signin/google-signin)
65

7-
❤️❤️ [New documentation site available!](https://react-native-google-signin.github.io/docs/install) ❤️❤️
6+
## Google Sign-In for React Native
87

9-
[website sources live here](https://github.com/react-native-google-signin/docs/tree/main/docs)
8+
`@react-native-google-signin/google-signin` provides Google authentication for React Native and Expo apps.
9+
10+
This is the free (public) version, supporting Android and iOS. It uses the legacy Google Sign-In SDK on Android.
11+
12+
**[Full documentation](https://react-native-google-signin.github.io/docs/install)**
13+
14+
## Looking for a modern implementation not relying on deprecated APIs, and web or macOS support?
15+
16+
[**Universal Sign In**](https://universal-sign-in.com) is the premium version of this package, built on modern Google identity APIs:
17+
18+
- **Cross-platform**: Android (Credential Manager), iOS, web, and macOS from a single API
19+
- **Config Doctor**: CLI tool that diagnoses Android configuration issues — no more hours lost to `DEVELOPER_ERROR`
20+
- **Auto-detect**: Automatic configuration parameter detection for faster setup
21+
- **Advanced security**: Custom nonce support, iOS App Check, and more
22+
- **Maintained**: Your purchase keeps the package rock-solid and up-to-date with new Expo and React Native releases
23+
24+
1 million+ npm downloads and trusted by indie hackers as well as large teams.
25+
26+
[**Get a license**](https://universal-sign-in.com/#pricing) | [**See what's included**](https://react-native-google-signin.github.io/docs/install#premium)
1027

1128
## Licence
1229

13-
(MIT)
30+
MIT

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@react-native-google-signin/google-signin",
33
"version": "16.1.1",
44
"description": "Google sign in for your react native applications",
5+
"funding": "https://universal-sign-in.com",
56
"main": "./lib/module/index.js",
67
"types": "./lib/typescript/src/index.d.ts",
78
"source": "./src/index.ts",

plugin/src/withGoogleSignIn.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { appendScheme } from '@expo/config-plugins/build/ios/Scheme';
21
import type { ExpoConfig } from 'expo/config';
32
import {
4-
ConfigPlugin,
3+
type ConfigPlugin,
54
AndroidConfig,
65
IOSConfig,
76
createRunOncePlugin,
@@ -46,7 +45,11 @@ const withGoogleSignInWithoutFirebase: ConfigPlugin<Options> = (
4645

4746
export const withGoogleUrlScheme: ConfigPlugin<Options> = (config, options) => {
4847
return withInfoPlist(config, (config) => {
49-
config.modResults = appendScheme(options.iosUrlScheme, config.modResults);
48+
const scheme = options.iosUrlScheme;
49+
const infoPlist = config.modResults;
50+
if (!IOSConfig.Scheme.hasScheme(scheme, infoPlist)) {
51+
config.modResults = IOSConfig.Scheme.appendScheme(scheme, infoPlist);
52+
}
5053
return config;
5154
});
5255
};

0 commit comments

Comments
 (0)