Accessing settings on iOS 7 simulator

StephenHauckStephenHauck USMember ✭✭✭

I know this has been talked about but I just upgraded to Xcode 5 and was doing some tutorials and came across something I just can't get to work.

I have the code below but it seems to not work, the value variable is always null.

public override void ViewWillAppear (bool animated)
{
string value = NSUserDefaults.StandardUserDefaults.StringForKey ("goalSettingsValue");
Goal.Text = value;
base.ViewWillAppear (animated);
}

You can see the values in Root.plist in the image attached and the location of the Settings.bundle folder in the other image.

Have I done something wrong or is something not working properly……

Thanks for ANY help in advance,
Stephen

Here is my version info from Xamarin:

=== Xamarin Studio ===

Version 4.2.2 (build 2)
Installation UUID: 8699130f-24f5-4c0b-8df5-6c50373123a6
Runtime:
Mono 3.2.5 ((no/964e8f0)
GTK+ 2.24.20 theme: Raleigh
GTK# (2.12.0.0)
Package version: 302050000

=== Xamarin.Android ===

Version: 4.10.1 (Business Edition)
Android SDK: /Users/stephenhauck/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: 7.0.4.209 (Business Edition)
Hash: 23a0827
Branch:
Build date: 2013-11-11 16:04:00-0500

=== Build Information ===

Release ID: 402020002
Git revision: c5f82958ae7d9af652b44b87ceff777b3ad19b91
Build date: 2013-11-19 15:35:40+0000
Xamarin addins: a4044fee09138f6fd031a9944b7caaeb51e57e80

=== Operating System ===

Mac OS X 10.8.5
Darwin sph-mbp 12.5.0 Darwin Kernel Version 12.5.0
Sun Sep 29 13:33:47 PDT 2013
root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64

Sign In or Register to comment.