SQLite existing database

That seemed to help… in the end my code looked like:

	// load in db
	Expo.FileSystem.downloadAsync(
    	Expo.Asset.fromModule(require('./assets/db/NRSV.db')).uri,
		`${Expo.FileSystem.documentDirectory}SQLite/nrsv.db`
	);

A lot of the code samples (including the 2nd comment here) used Expo.FS rather than Expo.FileSystem - I found once I switched over to the latter it worked without issue…

It might be worth adding something on this to the SQLite documentation as it seems like a regular use case.

Hope this helps someone else.

9 Likes