So, in my apps I have this code:
main.lua :
... local utility = require( "utility" ) local myData = require( "mydata" ) ..... myData.settings = utility.loadTable("settings.json") if myData.settings == nil then myData.settings = {} myData.settings.soundOn = true myData.settings.musicOn = true myData.settings.tutorial = true ........
and, myData.lua :
M = {} M.maxLevels = 50 M.levelScore = 0 M.products = {} M.settings = {} M.settings.currentLevel = 1 ...... return M
so, when I update (in the next version) a new variable (e.g. M.alarmTrigger = false in myData,lua and myData.settings.alarmTrigger = false in main.lua) and I update from my device, the app is error… but if I reinstall it will works normally.
Does the app read main.lua or myData.lua when the first time app is used?
How the app is updated? is the main.lua updated? is the myData.lua updated? how about the settings.json table will do after update?
So, what to do if I modify the settings but no need for reinstalling the app?
Thank you 