Widget with app groups

romkatzromkatz ILMember ✭✭

Hi,
When I am running my application on simulator everything works, but when I install it on a real device and run it, I get:
"object reference not set to an instance of an object".
My code is:

var defs = new NSUserDefaults("group.com.gto.extension", NSUserDefaultsType.SuiteName);
defs.Synchronize();
var equities = defs.ValueForKey(new NSString("key1"));

defs.ValueForKey(new NSString("key1")) - this row crashes my app.

Thank you

Tagged:
Sign In or Register to comment.