Johan Karlsson
Johan Karlsson

Reputation: 928

Key-value storage in MonoTouch

Is there a simple key-value storage in iOS/MonoTouch to persist settings between application sessions? Or do you have to build it yourself?

EDIT:

Example

// Some magic function that returns a storage
IKeyValueStorage storage = GetStorage();
storage.Store( "TheKey", "The value" );

var value = storage.Get("TheKey");

What I need is to know what mechanism to use behind this simple interface.

Thanks

// Ankmannen

Upvotes: 1

Views: 351

Answers (1)

yan.kun
yan.kun

Reputation: 6908

Easiest way way would be to go with NSUserDefaults. This creates a so called "plist" file (PropertyList) which is exactly what you want. The link describes, how to use it with MonoTouch.

Upvotes: 1

Related Questions