0

Why does the following code throws an error:

NSUserDefaults *sharedDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"com.apple.example"];
NSURL *m = [sharedDefaults URLForKey:@"test"]; // just another fileURLWithPath

NSURL *c = [NSURL fileURLWithPath:@"/Users/dummy/Documents"];
NSURL *d = [NSURL fileURLWithPath:@"/Users/dummy/Pictures"];
NSSet *q = [NSSet setWithObjects:c, d, m, nil];

In particular, the error is:

Service exited due to signal: Segmentation fault: 11

0 Answers0