Watermelondb: Set database directory

Created on 18 Jul 2019  路  2Comments  路  Source: Nozbe/WatermelonDB

Is possible to set database directory to use App Groups on iOS?
I have a Share Extension and want to access data between client and this extension, but I need to set the storage to path of App Group.

Most helpful comment

@djorkaeffalexandre you can pass a full file path to dbName - so you can pass from your own native code the path to JS to instantiate the SQLiteAdapter. we do this at nozbe 4 :)

PS. Would you mind contributing to the docs so that others can find this pro tip as well?

All 2 comments

@djorkaeffalexandre you can pass a full file path to dbName - so you can pass from your own native code the path to JS to instantiate the SQLiteAdapter. we do this at nozbe 4 :)

PS. Would you mind contributing to the docs so that others can find this pro tip as well?

@djorkaeffalexandre hey, so did this work for you?

Was this page helpful?
0 / 5 - 0 ratings