Skip to content

React Native: Use autolinking for SalesforceReact (moved to react-native-force)#521

Merged
wmathurin merged 6 commits into
forcedotcom:devfrom
wmathurin:rn-android-in-react-native
May 28, 2026
Merged

React Native: Use autolinking for SalesforceReact (moved to react-native-force)#521
wmathurin merged 6 commits into
forcedotcom:devfrom
wmathurin:rn-android-in-react-native

Conversation

@wmathurin
Copy link
Copy Markdown
Contributor

Summary

Updates all 4 React Native templates to use React Native autolinking for SalesforceReactPackage. The bridge code has moved from this repo's SalesforceMobileSDK-Android dependency to the react-native-force npm package.

Changes

All 4 RN Templates

  • Remove SalesforceReact from settings.gradle composite build substitution
  • Remove explicit implementation("com.salesforce.mobilesdk:SalesforceReact") from app/build.gradle
  • Remove manual SalesforceReactPackage registration from MainApplication.kt
  • Autolinking handles everything automatically

installandroid.js

  • Remove SalesforceReact/package.json cleanup (no longer exists in Android SDK)

Documentation

  • TESTING.md — Added SDK 14.0 note about --rn-force-branch controlling bridge code
  • docs/react-native-templates/TEMPLATE_ANATOMY.md — Updated composite build section

Related PRs

Before Merging

  • Revert all package.json sdkDependencies to forcedotcom#dev
  • Revert react-native-force dependency to forcedotcom#dev

Test Plan

  • All 4 RN templates build on Android
  • All 4 RN templates build on iOS
  • Template app runtime: login + contacts load

wmathurin added 5 commits May 22, 2026 15:22
- Add back `apply plugin: "org.jetbrains.kotlin.android"` removed by PR forcedotcom#516
- Bump kotlinVersion from 2.0.21 to 2.3.20 to match Android SDK libs
- Point package.json sdkDependencies at wmathurin#rn-migration for CI

NOTE: package.json changes (sdkDependencies pointing to wmathurin fork)
must be reverted before merging this PR to dev.
…ative-force)

- Remove SalesforceReact from settings.gradle composite build substitution
- Remove explicit SalesforceReact dependency from app/build.gradle
- Remove manual SalesforceReactPackage registration from MainApplication.kt
- Remove SalesforceReact/package.json cleanup from installandroid.js

React Native autolinking now handles SalesforceReactPackage registration
automatically via react-native-force's react-native.config.js.
NOTE: These must be reverted to forcedotcom#dev before merging.
@github-actions
Copy link
Copy Markdown

Job Summary for Gradle

Pull Request :: test-android
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
MobileSyncExplorerReactNative assembleDebug 8.14.3 Build Scan not published

@github-actions
Copy link
Copy Markdown

Job Summary for Gradle

Pull Request :: test-android
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
ReactNativeTemplate assembleDebug 8.14.3 Build Scan not published

@github-actions
Copy link
Copy Markdown

Job Summary for Gradle

Pull Request :: test-android
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
ReactNativeTypeScriptTemplate assembleDebug 8.14.3 Build Scan not published

@github-actions
Copy link
Copy Markdown

Job Summary for Gradle

Pull Request :: test-android
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
ReactNativeDeferredTemplate assembleDebug 8.14.3 Build Scan not published

Copy link
Copy Markdown
Contributor

@JohnsonEricAtSalesforce JohnsonEricAtSalesforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@wmathurin wmathurin merged commit d5a47c0 into forcedotcom:dev May 28, 2026
10 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants