jeudi 29 janvier 2015

Error in granting access to baasbox document objects which was created through ios code in a particular collection

Error is: Error Domain=com.baasbox.error Code=-22222 "id (null) no found" UserInfo=0x9daa3a0 {BaasBox_API_version=( "0.9.1" ), iOS SDK Version=0.9.0, NSLocalizedDescription=id (null) no found}


Code i used:


DeliveryTax *p = [[DeliveryTax alloc] init];


p.delTax = @"30";


[p saveObjectWithCompletion:^(DeliveryTax *del, NSError *error) {



[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];

if (error == nil) {
NSLog(@"Delivery tax in saving is %@", del.delTax);
[del grantAccessToRole:kAclRegisteredRole ofType:kAclReadPermission completion:^(DeliveryTax *post, NSError *error) {

if (error == nil) { NSLog(@"permission granted");

}
else {
NSLog(@"error in granting permission");
}

}];
}
else {

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"ERROR", nil)
message:NSLocalizedString(@"ERROR_SEND_ORDER", nil)
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil, nil];
[alert show];

}
}];



Aucun commentaire:

Enregistrer un commentaire