Is it a correct / widely used practice to store variables in the phone?

Hi, I have been using this method, even back when I was programming using Small Basic. I’m just wondering if it’s a widely used / accepted practice to store permanent variables in a text document on the phone. What I mean is like, let’s say you have a game with levels and a money amount. You cannot keep these variables when you exit the app, so you store the values to a text file on the phone for later reading. I have been thinking about it, and I can’t really think about any other way going about it, so I’m just wondering is this what “everybody else” does? Thanks so much :slight_smile:

EDIT: 

It seems like if you store a money variable for example onto the phone, it would be easy for someone who is kinda techy to just open up the phone’s document folder and easily exploit the game. Is this the case? And if there is a more secure way to store permanent variables (idk what they’re called), may I know how to? Thanks again :smiley:

This is something that I have been looking at recently.

From reading a few threads the general concensus, amongst those that would know, seems to be ‘Hackers gonna hack’. Don’t waste time trying to prevent the determined cheat.

For storing your data in a more secure fashion, you could look at something like GGData:

http://roaminggamer.com/2014/06/15/secure-data-storage-for-corona-sdk/

 

You could encrypt the variables using openSSL, then the only thing that can decrypt them is the app itself with the decryption key.

For progress on a casual game, probably not worth it.

But if you have sensitive content, or a flag which determines whether the user paid for in-app purchases, it maybe worth looking into.

The project I’m working on contains a large SQL database that has taken a lot of time and effort to compile from raw, unformatted data scraped from various sources. I don’t want anyone peeking at either the raw database or the game database generated for each new game, so I intend to encrypt certain fields.

This is something that I have been looking at recently.

From reading a few threads the general concensus, amongst those that would know, seems to be ‘Hackers gonna hack’. Don’t waste time trying to prevent the determined cheat.

For storing your data in a more secure fashion, you could look at something like GGData:

http://roaminggamer.com/2014/06/15/secure-data-storage-for-corona-sdk/

 

You could encrypt the variables using openSSL, then the only thing that can decrypt them is the app itself with the decryption key.

For progress on a casual game, probably not worth it.

But if you have sensitive content, or a flag which determines whether the user paid for in-app purchases, it maybe worth looking into.

The project I’m working on contains a large SQL database that has taken a lot of time and effort to compile from raw, unformatted data scraped from various sources. I don’t want anyone peeking at either the raw database or the game database generated for each new game, so I intend to encrypt certain fields.