Saving a CKRecord
in the simulator gives me the following error:
[publicDatabase saveRecord:cloudRouteEntity completionHandler:^(CKRecord *record, NSError *error) {
if (error) {
NSLog(@"An error occured in %@: %@", NSStringFromSelector(_cmd), error);
abort();
}
else {
dispatch_async(dispatch_get_main_queue(), ^(void) {
//GUI
NSLog(@"Created Cloudkit Entity");
});
}
}];
However, it works on the phone. Why does the simulator not have access to the CloudKit database?
EDIT: I thought I'd be clever by adding the iCloud account to the simulator - but iCloud moans that this is not allowed on "this device" (simulator). Ideas anyone?