File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
packages/powersync-op-sqlite Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ Example usage:
8787``` ts
8888let libPath: string
8989if (Platform .OS === ' ios' ) {
90- libPath = getDylibPath (' powersync-sqlite-core' , ' powersync-sqlite-core' )
90+ const bundlePath: string = getBundlePath ();
91+ libPath = ` ${bundlePath }/Frameworks/powersync-sqlite-core.framework/powersync-sqlite-core ` ;
9192} else {
9293 libPath = ' libpowersync' ;
9394}
Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ import {
1515} from '@op-engineering/op-sqlite' ;
1616import Lock from 'async-lock' ;
1717import { OPSQLiteConnection } from './OPSQLiteConnection' ;
18- import { Platform } from 'react-native' ;
18+ import { NativeModules , Platform } from 'react-native' ;
1919import { SqliteOptions } from './SqliteOptions' ;
20+ import { getBundlePath } from '..' ;
2021
2122/**
2223 * Adapter for React Native Quick SQLite
@@ -146,9 +147,10 @@ export class OPSQLiteDBAdapter extends BaseObserver<DBAdapterListener> implement
146147 }
147148 }
148149
149- private loadPowerSyncExtension ( DB : DB ) {
150+ private async loadPowerSyncExtension ( DB : DB ) {
150151 if ( Platform . OS === 'ios' ) {
151- const libPath = getDylibPath ( 'powersync-sqlite-core' , 'powersync-sqlite-core' )
152+ const bundlePath : string = getBundlePath ( ) ;
153+ const libPath = `${ bundlePath } /Frameworks/powersync-sqlite-core.framework/powersync-sqlite-core` ;
152154 DB . loadExtension ( libPath , 'sqlite3_powersync_init' ) ;
153155 } else {
154156 DB . loadExtension ( 'libpowersync' , 'sqlite3_powersync_init' ) ;
You can’t perform that action at this time.
0 commit comments