Skip to main content

Contributing

Bug reports, fixes and documentation improvements are welcome. Before opening an issue about a sign-in failure, check Troubleshooting: most failures come from the Google Cloud setup.

Set up​

You need Bun 1.4.4 or newer. iOS work needs Xcode 27; Android work needs the Android SDK and NDK that NitroUI requires.

bun install # links the workspace, generates bindings and prepares the example
PathContents
packages/nitro-google-signin/srcThe TypeScript API and the GoogleSignIn.nitro.ts Nitro spec.
packages/nitro-google-signin/iosThe Swift implementation.
packages/nitro-google-signin/android/src/main/java/…The Kotlin implementation.
exampleA NitroUI app that calls every API, and the native tests.
websiteThis documentation site.

After changing GoogleSignIn.nitro.ts or a type in src/types, regenerate the bindings with bun run specs. Never edit nitrogen/generated.

Checks​

CI runs these on every pull request. Run them before you push:

bun run lint
bun run format:check # `bun run format` fixes formatting
bun run typecheck
bun run test

bun run test runs the TypeScript unit tests. Native behaviour is covered by nitro-ui-harness tests in example/__tests__, which run inside the example app:

bun run test:ios --device "<simulator name or UDID>"
bun run test:android --device <adb-serial>

Name tests that only apply to one platform *.ios.harness.ts or *.android.harness.ts. The harness tests need a .env, but not real IDs: CI copies .env.example as is.

Documentation site​

cd website
bun install
bun run start # dev server with hot reload
bun run build # static site in website/build

Pull requests​

  • Keep the Swift and Kotlin implementations in step. If a behaviour differs between platforms, document it under Platform differences.
  • Every native failure must reject with a [CODE]-tagged message from GoogleSignInErrorCode. Add a new code to googleSignInErrorCodes, the error tables, and both native error types.
  • Add an entry under ## [Unreleased] in packages/nitro-google-signin/CHANGELOG.md for user-visible changes.
  • Add or update harness tests for native behaviour that can run without a Google account.

See CONTRIBUTING.md for the release process.