Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 4, 2013, 09:19 PM   #1
xArtx
macrumors 6502a
 
Join Date: Mar 2012
Hiding App Data

Hi Guys,
An App of mine has a database in it's documents directory containing
information that is both read and written to by the program.

If someone jailbreaks their iPhone, and accesses the filesystem, the data
file could be changed by the end user, and in this case, it could make the
app offer different functionality than is intended.

So...

Is is acceptable to xor every byte in the data file against a table of random bytes,
thereby messing it up without calling that encryption?

The only other solution I can think of is checksumming the file, and requiring
a particular checksum value being correct any time the file is changed by
the App as well as an end user fiddling from the outside.

Any thoughts?

Last edited by xArtx; Feb 5, 2013 at 10:46 AM.
xArtx is offline   0 Reply With Quote
Old Feb 4, 2013, 09:44 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by xArtx View Post
Is is acceptable to xor every byte in the data file against a table of random bytes,
thereby messing it up without calling that encryption?
That is encryption. It's called a stream cipher. ARC-4 is an example. There are many others.


Exactly what are you trying to defend against? Someone obtaining an in-app-purchased feature by performing an unauthorized change to the database?
chown33 is offline   0 Reply With Quote
Old Feb 4, 2013, 10:07 PM   #3
xArtx
Thread Starter
macrumors 6502a
 
Join Date: Mar 2012
I'm trying to prevent the database from being changed by an end user outside of the application itself, or replaced entirely.
The database comes with the main bundle, but must be written to the Docs directory
at run time so the App can write to it.

I don't care who sees it, but I don't want it altered with any editor other than the App.
xArtx is offline   0 Reply With Quote
Old Feb 4, 2013, 11:36 PM   #4
MattInOz
macrumors 68030
 
MattInOz's Avatar
 
Join Date: Jan 2006
Location: Sydney
NSFileProtectionComplete
__________________
There is no such thing as "Collective Wisdom"
[ iPhone 5s, iPad Mini, 13" MacBookPro 2.7Ghz, 27"Al iMac i7, Black MacBook 13"]
MattInOz is offline   0 Reply With Quote
Old Feb 5, 2013, 10:25 AM   #5
xArtx
Thread Starter
macrumors 6502a
 
Join Date: Mar 2012
Quote:
Originally Posted by MattInOz View Post
NSFileProtectionComplete
Yes, but that is really three words

it's a free vector GPS that covers one particular Qld National Park only.
I got permission to use Commonwealth map data today,
although I digitised it some 5 years ago for personal use

There was an SES search and rescue on the weekend with at least one chopper deployed,
and it happens at least yearly. That prompted me to contact them.

The map data is MP format which is optimised from there (coordinates written to floats, etc)
at run time. But the stored map data is Human readable ASCII.

What I was going to write back to the map is known points of mobile reception,
especially if there's a way to query the iPhone's cellular receiver without getting in trouble,
but how narrow minded is that? It can be written to a separate file.
This is resolved.

Last edited by xArtx; Feb 5, 2013 at 10:45 AM.
xArtx is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
CTIA Launches 'Know My App' Website Showing Mobile App Data Usage MacRumors iOS Blog Discussion 14 Dec 28, 2013 04:26 PM
Hiding The App In Settings loon3y iPhone/iPad Programming 1 Mar 22, 2013 11:16 AM
iPad: Hiding Data Usage on iPad mini Verizon kjs862 Jailbreaks and iOS Hacks 1 Feb 6, 2013 05:33 AM
Hiding specific calendars in Reminders.app macdk Mac Applications and Mac App Store 0 Aug 11, 2012 06:21 AM

Forum Jump

All times are GMT -5. The time now is 10:33 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC