Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Is there a TIniFile implementation using "NSUserDefaults" on Apple?


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jan 6, 2016 1:36 AM Last Post By: Hans Jakobsen
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Is there a TIniFile implementation using "NSUserDefaults" on Apple?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2015 9:50 AM
I am looking for a platform independant way to store user settings (HKCU on Windows and NSUserDefaults on OSX/iOS).
I found this article, but the sample code seem to be outdated.
http://edn.embarcadero.com/article/43065

Is this code updated somewhere?

I found this 3rd party package but prefer if I can make it without another package dependency:
http://www.jvesoft.com/wp/persistent-storage/
Chris Rolliston

Posts: 332
Registered: 4/6/00
Re: Is there a TIniFile implementation using "NSUserDefaults" on Apple?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 2, 2016 12:04 PM   in response to: Hans Jakobsen in response to: Hans Jakobsen
Hans Jakobsen wrote:
I am looking for a platform independant way to store user settings (HKCU on Windows and NSUserDefaults on OSX/iOS).
I found this article, but the sample code seem to be outdated.
http://edn.embarcadero.com/article/43065

There are various implementations around. For example, I have one (originally done for XE2/OS X, later extended for iOS and Android):

https://github.com/chrisrolliston/CCR.PrefsIniFile

Technically I'm using the Core Foundation API variant rather than NSUserDefaults, but it comes down to exactly the same thing.
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Re: Is there a TIniFile implementation using "NSUserDefaults" on Apple?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 6, 2016 1:36 AM   in response to: Chris Rolliston in response to: Chris Rolliston
Chris Rolliston wrote:
There are various implementations around. For example, I have one (originally done for XE2/OS X, later extended for iOS and Android):
https://github.com/chrisrolliston/CCR.PrefsIniFile

Thanks, I will have a look at your implementation.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02