Skip to main content

Example app

example is a NitroUI app that calls every API, with the branded sign-in button you can copy.

Configure the client IDs​

The example reads its OAuth client IDs from example/.env, so it needs no GoogleService-Info.plist, google-services.json or edits to Info.plist:

cp example/.env.example example/.env
KeyValue
GOOGLE_WEB_CLIENT_IDThe Web application client ID, used on both platforms.
GOOGLE_IOS_CLIENT_IDThe iOS client ID.
GOOGLE_IOS_URL_SCHEMEThe reversed iOS client ID, com.googleusercontent.apps.<id>.

Write KEY=value lines without quotes or spaces around =. The iOS build reads them into Info.plist through example/ios/GoogleSignIn.xcconfig, and the Android build turns GOOGLE_WEB_CLIENT_ID into the default_web_client_id resource. The values are compiled into the app, so rebuild it after changing .env.

On Android, also register the example's package name and the SHA-1 of example/android/app/debug.keystore on an Android OAuth client in the same project.

Run it​

cd example
bun run nitro-ui prepare
bun run ios --device <simulator-UDID>
bun run android --device <adb-serial>