Skip to content

Add swiftpmConfig.name for React Native SwiftPM autolinking - #476

Merged
ospfranco merged 1 commit into
OP-Engineering:mainfrom
chrfalch:swiftpm-config-name
Oct 29, 2026
Merged

ospfranco merged 1 commit into
OP-Engineering:mainfrom
chrfalch:swiftpm-config-name

Conversation

@chrfalch

@chrfalch chrfalch commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

The library ships a Package.swift with product OpSqlite. React Native 0.88 SwiftPM autolinking looks for a product named op-sqlite unless package.json sets swiftpmConfig.name, so the app fails at package resolution.

This adds swiftpmConfig.name to package.json to select OpSqlite. It has no effect on CocoaPods or Android.

React Native 0.87 reads only the older spm block in react-native.config.js. This key matters from React Native 0.88 on.

Test plan:

  • Fresh React Native 0.88.0 app with op-sqlite 19.0.2 from npm, with this key added to its package.json.
  • npx react-native spm add --deintegrate completed.
  • Release build for an iOS 27.1 simulator: the package resolved, BUILD SUCCEEDED. Without the key, the build fails at package resolution.
  • At runtime, open + select 1 returned {"rowsAffected":0,"rows":[{"1":1}]}. No crash.

@ospfranco

Copy link
Copy Markdown
Contributor

Thank you!

@ospfranco
ospfranco merged commit b177c26 into OP-Engineering:main Oct 29, 2026
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.

2 participants