I'm making mobile 2D puzzle game by Unity
using LitJson, Save&Load game data by .json file (public data)
I made class Userdata, in the class there are money and items.. also read & write by json
But I don't want to edit this json file who downloaded apk
How to prevent this?
You cannot completely protect data stored in the application. The most secure way to prevent players/ users from altering (save)game data, is to store them on a remote storage/database.
Taking database as an example, you could write PHP scripts which serve as middleman communicating between the database and your application.
In these scripts you would generally determine the logic and security handling on who gets to retrieve/ send what data to which table.
you can use binary formter as it will save your data in binary encrypted formate.
while this still can be decrypted, but will minimize the chances for regular users
Edit: Binary formater is no longer secured to be used, use binary writer instead for data about monetizing.
Related
I have a flutter application that is meant for collecting data on road usage, and I would like to carry out analysis after collection of data.
I've saved the file and I am able to read the file via readAsString and writeAsString to
'data/user/0/com.example.flutter_example_app/app_flutter/fault_report.txt'
How can I access the data quickly and easily without having to integrate too much stuff [For instance, opening an API and writing to cloud and etc]?
The app is supposed to be just a collection method and all analysis will be carried out afterward.
It depends on how ofter you would like to retrieve your data. If you only want to get the data once in a while, you can use File Explorer, Bluetooth file sharing, Cloud Drive or etc. to retrieve your data. But if you want to retrieve data more often, making some simple api will not take too much time.
I developed an application for Android with Ionic2 framework. I used Local storage functions to handle data.
Now, I want to replace local storage by database with some API calls.
And before switching to my API, I wish to extract the application data in order to no lost them.
Q1: That why, I wonder where is the path for the local storage data? In other words, where can I find the file with my stored data?
Q2: If retrieving my data isn't possible. I was wondering: If I modify the application with a extract function, when I reinstall it, will it delete my data or leave it as it is? (and so extract my data easily)
Thanks for your help!
I hope I gave enough information.
Local storage doc: https://ionicframework.com/docs/building/storage/
Which use localForage: https://github.com/localForage/localForage
I'm using Core Data to store some sensitive information. So far, I've applied hardware file encryption to the SQLite file used by the Persistent Store Coordinator. I've done this by setting its file Attributes (NSFileProtectionKey to NSFileProtectionComplete).
I'm storing some image data as Binary Data in the Core Database and I've checked off the "Allows External Storage" and "Store in External Record File" to prevent bloating of my SQLite datastore and to improve performance.
I'm presuming that the data files automatically stored outside of the SQLite database by Core Data will NOT be encrypted and that I need to encrypt these files myself. Does anyone know if this is correct?
Thanks
luckman777,
Every version preinstalled of iOS will hardware encrypt every file when the user uses a screen lock. With respect to your question about external Core Data storage, why don't you just look at the files? It is quite straightforward to move the data from the phone to your dev system. Then try to open one of the external files. I expect that it is encrypted. (If not, that is a rather big and obvious hole in Core Data's encryption policy. I doubt that it exists.)
Andrew
Hidden, but not encrypted!
The folder it currently (iOS 11.2) holds the data is under Documents/.SingleViewCoreData_SUPPORT/_EXTERNAL_DATA
There, you can see all the files, without their extension in a token-name. However, the data is all there unchanged. You can view any file by simply adding the file extension or using the right App.
Yes, the device data is encrypted when the screen is locked, but connected to Xcode, you can very easily download the container and access all the data. If your app holds sensitive data, the 'device is encrypted' will simply not hold.
Only the SingleViewCoreData.sqlite file seems to be encrypted.
I'm using core data in our iOS universal application and want the ability for the user to back their data up to our server. So they can log in with another device and pull down that data to that device. Has anyone got any advice on this? I want to analyse the data at the server to synchronise information with our stores as well, so the data must be readable via the server end as well.
I want to send the entire core data store over in one push, so will be an XML mashup of entities from the core data store that will be deciphered on retrieval.
How can I do this?
Have accomplished this using GDataxml to build the xml string and push it through a web service at the server end. Performance is great.
Your duplicating some iCloud functionality here. Why not leave the cloud storage and retrieval to iCloud and then when the app starts, synchronise with your server
I am developing an iPhone app which retrieves information via NSUrlRequest and displays through UIWebView.
I want to hold initial data (such as HTML pages, images) as a cache so that users of my app can access to data without network costs at the first time.
Then, if data on my web server are updated, I would download them and update the cache.
For performance issues, I think it is better to store data on file system than on core data.
Yet, I think it's not possible to release a new app writing data on disk.
So, I am about to store initial data(or initial cache) at Core Data, and when users launch my app for the first time, I would copy the data to disk (like /Library folder).
Is it, do you think, a good approach?
Or,...hmm, can I access to Core Data using NSUrlRequest?
One more question,
I might access to file system using NSURL, which is the same as to data on the Web. (right?)
My app would compare version of the cache with version of data on my web server, and if it's old, retrieve new data.
and my app will access only to file system.
All data are actually HTML pages including script, and images. And, I want to cache them.
could you suggest a better design?
Thank you.
Is it, do you think, a good approach? Or,...hmm, can I access to Core Data using NSUrlRequest?
No.
One more question, I might access to file system using NSURL, which is the same as to data on the Web. (right?) My app would compare version of the cache with version of data on my web server, and if it's old, retrieve new data. and my app will access only to file system. All data are actually HTML pages including script, and images. And, I want to cache them.
Yes.
But you could also be more clever. And by "more clever" I mean "Matt Gallagher." Take a look at his very interesting approach in Substituting local data for remote UIWebView requests.