Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5988317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:56:31+00:00 2026-05-22T22:56:31+00:00

We can use sqlite, nsuserdefaults or ordinary file system for saving gamedata on iPhone.

  • 0

We can use sqlite, nsuserdefaults or ordinary file system for saving gamedata on iPhone. These data are usually stored in the Documents directory, but files under the Documents directory can be easily modified without JailBreak. (Actually some cheated scores were posted to the server before)

There are some ideas I considered to prevent cheating by modifying save data.


Encrypt file

Simply encrypt data file and decrypt it on reading. It seems secure but the performance will be sacrified if the game need to update gamedata frequently.

SQLite encryption

There are some encrypt extension libraries for sqlite. The problems are the cost and the licenses.

Verifier / Checksum

Store the checksum of saved data and detect cheat by using it. It might cause FALSE POSITIVE result if the saving checksum failed by some reason.

Keychain

Store data into keychain. But we can’t use sqlite. And is it okay to store large data in keychain?


Each idea has a flaw. Can you give me any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:56:32+00:00Added an answer on May 22, 2026 at 10:56 pm

    One flaw in the design seems to be that you are trusting the local data. Instead I’d recommend that you treat the local data as unsafe user data. That way, a user can manipulate it all they want, but you’ll never send it to your server to be published.

    When a user completes a game, have the game send the score to the server right away. If you like, your server can send back a signed copy (hashed) that you can save wherever you want in whatever format you want. In your game, you could add a little “verified score” badge next to the scores that took place while they were online. If the verified score is manipulated, then the hash won’t work, and (locally anyway) they’ll loose their score.

    If your user is offline, then their score cannot be verified. You can still save it locally with all the signed scores, but don’t have to worry about syncing up bad data at all. Simply never send data to your server that was read from the local filesystem.

    From a user experience perspective this may not be ideal, but you can frame it by telling your users “If you are connected to the internet when you get a high score, your score will be verified and published in the global top list” or something to that effect. I’m sure you can figure out a way to handle it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a sqlite file. I want to use it in my application. Can
Can I use SQLite's FTS3 when building for the iPhone and iPad?
I'd sort of like to use SQLite from within C#.Net, but I can't seem
What components can I use to use SQlite database with Delphi 6?
I'm trying to use sqlite as database for a symbian app but I can't
I use sqlite(3.7.4) in iphone. I create a table like: create table A (UserName
You can use more than one css class in an HTML tag in current
You can use a standard dot notation or a method call in Objective-C to
I can use properties of an Excel Worksheet to tell if the worksheet is
You can use ftplib for full FTP support in Python. However the preferred way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.