Hi,
using eas-cli/0.42.4 win32-x64 node-v16.8.0.
I try to load my prebuild sqlite db in useCachedRecources.ts with this code:
if (!(await FileSystem.getInfoAsync(FileSystem.documentDirectory + 'SQLite')).exists) {
await FileSystem.makeDirectoryAsync(FileSystem.documentDirectory + 'SQLite');
}
await FileSystem.downloadAsync(
Asset.fromModule(require("../assets/db/my.db")).uri,
FileSystem.documentDirectory + 'SQLite/my.db'
);
Using expo everything works fine. App loads the DB on startup.
Building with EAS for iOS works, too, but loading the DB fails with this error:
Same error running on the iOS simulator and a real device.
metro.config.js is properly setup according to the docs with:
const { getDefaultConfig } = require('@expo/metro-config');
const defaultConfig = getDefaultConfig(__dirname);
defaultConfig.resolver.assetExts.push('db');
module.exports = defaultConfig;
What am I doing wrong? Such a simple problem, but it’s driving me nuts…
Any help would be appreciated!
Greetings, Chris