"collection element of type BOOL" is not an objective-c object
ios, objective-c
Solution
You cannot put a fundamental data type in a dictionary. It must be an object. But you can use `[NSNumber numberWithBool:isExclusive]` or use the `@(isExclusive)` syntax:
[[RKObjectManager sharedManager] postObject:genObject
path:@"users/update.json"
parameters:@{
...
@"em_id" : ObjectOrNull(em.emID),
@"exclusive": @(isExclusive), ...
I also don't suspect you meant to use `BOOL *` as your parameter. You presumably intended:
- (void)postPrimaryEMWithEM:(EM *)em
exclusive:(BOOL) isExclusive
success:(void (^)())onSuccess
failure:(void (^)())onFailure {
...
}
Again, a `BOOL` is not an object, so the `*` syntax was presumably not intended.
Problem
Anyone have a clue why I am getting this? ``` -(void)postPrimaryEMWithEM:(EM *)em exclusive:(BOOL) isExclusive success:(void (^)())onSuccess failure:(void (^)())onFailure { if(self.accessToken) { GenericObject *genObject = [[GenericObject alloc] init]; [[RKObjectManager sharedManager] postObject:genObject path:@"users/update.json" parameters:@{ ... @"em_id" : ObjectOrNull(em.emID), @"exclusive": isExclusive <-- error message ```