Does Json protect files effectively

@rob miracle

Thanks Rob. How do you go about protecting the json files you create/use in your apps? What is the standard practice most developers use to store/save the game states? I assume create a small json file and ‘hope’ the user does not try to alter it. I would goes the average user would not bother.
Is there some other trick developers are using to protect the game state data?

@crafty

Thanks crafty. My user will be acquiring some special points, that would unlock another level or something like that when certain amounts of points are accumulated (not necessarily an IAP … but could be) … anyway, I am just wanting to avoid situation where the user could get into the game state file where I would have saved their progress(i.e… points earned) and alter that.

I am going to avoid encrypting… looks like alot of downside. I do like the code you show, setting a random file name, when user does in IAP. I think that will be very helpful.

Thanks
[import]uid: 148857 topic_id: 30493 reply_id: 122228[/import]

No problems.

Forgot to mention that if any encryption is used it needs a bit of paperwork behind it before you can submit it.

If you did want to use encryption, this blog describes the process quite well (AFAIK, Apple only require the US governments’ approval?)

http://blog.theanimail.com/iphone-encryption-export-compliance-for-apps [import]uid: 62706 topic_id: 30493 reply_id: 122229[/import]

No problems.

Forgot to mention that if any encryption is used it needs a bit of paperwork behind it before you can submit it.

If you did want to use encryption, this blog describes the process quite well (AFAIK, Apple only require the US governments’ approval?)

http://blog.theanimail.com/iphone-encryption-export-compliance-for-apps [import]uid: 62706 topic_id: 30493 reply_id: 122230[/import]

I don’t bother. Apple does a pretty good job of making your data not accessible from other apps. Most people shouldn’t be able to get to it.

A hacker will likely be using a jailbroken phone and even with a 2 way encryption, if they want in, they will get in.

None of my games have data that one would want to hack other than unlocking all levels and if so, it’s not a big deal.

[import]uid: 19626 topic_id: 30493 reply_id: 122233[/import]

Thanks to both of you. Good to know. [import]uid: 148857 topic_id: 30493 reply_id: 122237[/import]

It might be worth looking into using a database to store your values.

It’s obviously not an alternative to encryption, but it’s definitely better than a plain text file.

In order to modify your values the user would have to know that it was an SQLite DB, mount the SQLite db (using some kind of SQLite client/manager) and then edit the fields in the tables. Otherwise, the file just looks like a large binary file.

Ali [import]uid: 10499 topic_id: 30493 reply_id: 122266[/import]

Database is a great idea, I really need to brush up on SQL.

You could always obfuscate the data before writing it to a table too. [import]uid: 62706 topic_id: 30493 reply_id: 122277[/import]