Help saving on ios

ho88it

Member
Hello. I am working on a game which is to run on ios. It is nearing completion, but I am having a small issue. I wrote some code to save and load values including highscores, coins, and items purchased using .txt and .ini files. I tested them on windows and on android virtual devices, and it worked as expected. However, when I tested on an ios device, my data never saves, and resets back to default values each time. This happens every time I close the app by swiping up on it, and whenever I reupload it to the phone. Any ideas on how to fix this ios issue?
 

ho88it

Member
Problem was game never ran game end event due to "pause frame being registered". SO I had to save the coin count when I picked the coins up, instead of when the game ended, for example.
 

Ommn

Member
If it rarely changes ex: coins
you can save when change coins
If it is constantly changing ex: score
you can save after every minute
 
Top