On 19 Aug 2014, at 3:25 pm, Navneet Kumar <navnee...@me.com> wrote:

> I need to store a numeric value in the system and update and access it across 
> every launch of my app.

NSUserDefaults


> Also is it possible to safely store it in the system so that it can be picked 
> up even after a re-install of my app?

NSUserDefaults

> I want it to be secure, so that even a os x savvy user may not be able to 
> delete/modify this value.


Not really possible - the user owns their own computer, they can do with them 
as they wish. However, there are ways to hide a setting so that it's harder to 
find. An easy-ish solution is to use CFPreferences in the 'by host' domain. 
It's not very hidden, but slightly more so than the normal user defaults. You 
can also write a value to a file in all sorts of locations (notwithstanding 
what sandbox might have to say about it) but a determined user can always find 
it and delete it. This is right and proper - as a user I have every right to 
know exactly what my computer is doing, and no part of it should be hidden or 
inaccessible from me.

--Graham





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to