Repository navigation
Conversation
🦋 Changeset detectedLatest commit: c708f9c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
|
Superseded by #9955 (comment) (re-recorded with full-frame-rate capture). |
|
Superseded by #9955 (comment) (re-recorded so push and modal animations are captured). |
|
Superseded by #9955 (comment) (re-recorded from a plain create-expo-app app with no native workarounds). |
|
Superseded by #9955 (comment) (re-recorded from a plain create-expo-app app with no native workarounds). |
|
Native components from a plain app: a fresh
components-final.mp4 |
|
JS-only app from a plain app: a fresh
jsonly-final.mp4 |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…k/expo The hook reads Clerk session state through useAuth, so moving it into @clerk/expo-native-components made that package depend on @clerk/react. An app whose @clerk/expo resolved an older @clerk/react could then get a second copy, and the hook would read a different React context than ClerkProvider. Keep the hook where it is on main. It finds the ClerkExpo native module by name, like native client sync and useNativeClientEvents, and falls back to the JS session state when the module is missing. @clerk/expo-native-components no longer depends on any Clerk JS package, which matches @clerk/expo-biometrics and @clerk/expo-google-signin.
…lit for users upgrading Merge the two changesets into one entry for both packages, in the shape of the @clerk/expo-biometrics one. It leads with what an app has to do, drops the claim that native client sync moved, and no longer mentions where useAuthViewState lives because its import path does not change.
npx expo install adds the config plugin to a static app config on its own, and the @clerk/expo plugin applies it and forwards keychainService and theme when the package is installed. Neither step needs to be in the changelog.
Description
Builds on #9989 (merged), which moved biometric credential enrollment and sign-in to
@clerk/expo-biometricson today's sync. Stack: main ← this PR ← #9957 ← #9954 ← #9956 ← #9958 ← #9962.Moves everything in
@clerk/expothat depends on the Clerk native SDKs (clerk-ios / clerk-android) into a new optional package,@clerk/expo-native-components. Apps that don't install it no longer get the Clerk native SDKs, the native module, native client sync, or the iOS 17 minimum.What this gains
For apps that don't use native components:
@clerk/expobuild pulls in clerk-ios and clerk-android. After this change they're only linked when@clerk/expo-native-componentsis installed. A JS-only test app builds with noClerkExpo/ClerkKitpods and no ClerkKit symbols in the iOS binary, and with no Clerk native classes in the Android APK.@clerk/expo's plugin raised every app's deployment target to it. The JS-only test app builds at iOS 16.4.ClerkProviderconfigures the native SDK in every native build today. That means extra/clientand/environmentrequests at startup, token polling every 5s, refreshes when the app returns to the foreground, and the native↔JS sync engine, all in apps that never render a native component. None of it runs unless@clerk/expo-native-componentsis installed.Pods.xcodeprojfor pods with Swift Package dependencies. JS-only apps no longer hit that.For the SDK:
@clerk/expo-native-componentsturns native Clerk on.__experimental_disableNativeClientSyncis no longer needed to keep JS-only apps unaffected.@clerk/expo-native-componentsusers.What it costs
AuthView,UserButtonorUserProfileViewhave to install@clerk/expo-native-componentsand rebuild.npx expo installadds its config plugin to a static app config, and the@clerk/expoplugin applies it either way. Existing@clerk/expo/nativeimports keep working through a shim that throws a clear install error when the package is missing. This ships as a minor because native components are beta.This is a move plus wiring only. The JS sync engine is not rewritten:
ClerkProvider, native client sync,useAuthViewStateanduseBiometricCredentials().reverify()stay in@clerk/expoand keep resolving theClerkExponative module by name, so they work when@clerk/expo-native-componentsis installed and are no-ops or unavailable when it isn't.Moved to
packages/expo-native-components(git mv):ios/andandroid/(module, views, app delegate subscriber, bridge, Compose hosts, theme loading, biometric functions, native tests),ClerkExpo.podspec,android/build.gradle,expo-module.config.json,react-native.config.js, andcodegenConfig.src/native/*(now the package root:AuthView,UserProfileView,UserButton, custom pages API and types) and the native view specs, with their unit tests.useAuthViewStateand its test stay in@clerk/expo.app.plugin.jsnative-SDK parts: iOS 17 deployment target,ClerkExpoVersion, Android META-INF exclusion and-Xskip-metadata-version-check,keychainService,theme. The theme validation tests moved with it.@clerk/expo-native-componentsdoesn't depend on@clerk/expoor on any other Clerk JS package, so the two packages don't form a workspace cycle and an app can't end up with a second copy of@clerk/react.useAuthViewStateis the one part ofsrc/nativethat reads Clerk session state, so it stays in@clerk/expoand finds theClerkExpomodule by name, like native client sync. Its config plugin still reports the installed@clerk/expoversion inx-clerk-host-sdk-version: it writes it toClerkExpoVersionin Info.plist and toclerkExpo.hostSdkVersioningradle.properties, falling back to the@clerk/expo-native-componentsversion when the plugin hasn't run. The plugin also fails prebuild with an upgrade message if the installed@clerk/expostill bundles the native module, since both would register theClerkExpopod and Android module.Backwards compatibility in
@clerk/expo(shipped as a minor since native components are beta):@clerk/expo/nativere-exports from@clerk/expo-native-componentsusing arequire()intry/catch, which Metro treats as an optional dependency. Without the package, rendering a component or callinguseUserProfileCustomPageNavigationthrows an error explaining how to install@clerk/expo-native-components.useAuthViewStateis exported by@clerk/expoitself and falls back to the JS session state, as it does onmainwhen the native module is missing. The entry's types come from a checked-innative/index.d.tsthat re-exports@clerk/expo-native-componentsplus the hook's own types.@clerk/expoconfig plugin keeps the hosted auth intent filter,appleSignInandfaceIDPermission, and no longer forces iOS 17. When@clerk/expo-native-componentsis resolvable from the project, it applies that package's plugin (run once, forwardingkeychainService/theme, with options on an explicit@clerk/expo-native-componentsentry taking precedence), so apps that only list@clerk/expokeep their native configuration. If it isn't installed and native-only options are passed, it warns with install instructions.@clerk/expo-native-componentsis an optional peer dependency of@clerk/expo.useBiometricCredentials().reverify(), the only biometric method that still uses the native SDK after feat(expo): move biometric credentials to JS with @clerk/expo-biometrics #9989, now tells you to install@clerk/expo-native-componentswhen the native module is missing. Enrollment and sign-in only need@clerk/expo-biometrics.The native fixture workflow now packs and installs
@clerk/expo-native-components, and the fixture lists its plugin.Recordings of both halves are attached in the comments: a JS-only app without
@clerk/expo-native-components, and an app with it renderingAuthView,UserButtonandUserProfileView.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code