Migrate to new arch#595
Open
vgirbes wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a react-native application which needs to be upgraded to 0.82v. We needed to adapt the react-native-sqlite-storage to be able to use it with react-native new architecture. These are the changes we've made to adapt the library with Claude Code help.
Changes in the local library (
react-native-sqlite-storage/)Required because the published v6.1.0 does not compile against React Native 0.82 + New Architecture.
File:
platforms/android/build.gradleChange: Added
apply plugin: 'com.facebook.react'(only when New Architecture is enabled),react { libraryName, codegenJavaPackageName, jsRootDir }block,srcDirsfor codegen, andbuildConfigFieldforIS_NEW_ARCHITECTURE_ENABLED.Reason: Without these changes, the codegen step was not executed and
NativeSQLiteSpec.javawas never generated.File:
SQLitePluginPackage.javaChange: Replaced
ReactFeatureFlags.useTurboModuleswithBuildConfig.IS_NEW_ARCHITECTURE_ENABLED.Reason: The previous API was removed in React Native 0.81+.
File:
SQLitePlugin.javaChange: Removed the
getName()override.Reason: The method is now generated as
finalby the codegen process.Files:
src/specs/NativeSQLite.ts,SQLitePlugin.java,lib/sqlite.core.jsChange: Renamed the bridge method from
deletetodeleteDb.Reason:
deleteis a reserved keyword in C++, causing the generated JSI bindings to fail compilation. The public JS API remains unchanged (SQLite.deleteDatabase(...)is still used).