Set up iOS, macOS, and Android apps with clerk init
- Category
- Product
- Published
clerk init now sets up Clerk in Xcode and Android projects, or creates a new app with Clerk already set up.
The Clerk CLI now sets up native apps. Run clerk init in an Xcode or Android project, and it links your Clerk application, registers your app, and adds the Clerk SDK.
What's new
- Existing apps. Run
clerk initfrom the folder with your Xcode project, or from your Android project's root. In an Xcode project, it installs the Clerk iOS SDK with Swift Package Manager. In an Android project, it adds the Clerk Android SDK to your Gradle build and initializes Clerk in yourApplicationclass. - New apps.
clerk init --starterwith--framework ios,--framework macos, or--framework androidcreates a SwiftUI or Jetpack Compose app with Clerk set up. Add--prebuilt-auth-uito include Clerk's prebuilt sign-in screen. - Native sign-in.
--sign-in-with-appleturns on native Sign in with Apple.--sign-in-with-googleturns on native Sign in with Google for Android and lists the Google Cloud steps the CLI can't do for you. clerk doctor. Run it to check your iOS, macOS, or Android setup.- Agent mode. Agents can run setup with
--mode agent --json. The iOS and Android quickstarts include a prompt you can give your agent.
iOS and macOS setup needs Xcode on a Mac. Android setup works on macOS, Linux, and Windows.
Get started
Use clerk 4.4.0 or later:
npx -y clerk@latest initThen follow the iOS quickstart or the Android quickstart, or see the Clerk CLI docs.