Save data into the sqlite file located in the assets folder. #466
-
Hi, I'm using the copyFromAssets function, and I'm trying to store data, the problem is that when I restart the app the data it's the same, it didn't store anything. I guess it is because the data is not stored in the sqlite file inside the assets folder. Is there any way to overwrite this file? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@rbonilla31 In both Swift (for iOS applications) and Java (for Android applications), you typically cannot directly override a database stored in the application's asset folder. The asset folder is usually considered read-only, and the contents are bundled with the application at build time. |
Beta Was this translation helpful? Give feedback.
@rbonilla31 In both Swift (for iOS applications) and Java (for Android applications), you typically cannot directly override a database stored in the application's asset folder. The asset folder is usually considered read-only, and the contents are bundled with the application at build time.
When you use the copyFromAssets function, the database is copied from the application's asset folder to the the folder you set-up in the capacitor.config.ts file and there the modifications that your application made are saved in that database. Hope this clarify.