The problem is that I am mutating a NSDictionary
, but even after getting a mutableCopy
, the app crashes.
Below is Method for copy :
+ (NSMutableDictionary *)updateQuery:(NSMutableDictionary *)currentQuery toSearchAfterAccountPaginationSequence:(NSString *)accountPaginationSequence {
//try1
NSMutableDictionary *mutableQuery = [currentQuery mutableCopy];
//try2
NSMutableDictionary *mutableQuery2=[NSMutableDictionary dictionaryWithDictionary:currentQuery];
//crashes on this line
mutableQuery[@"where"][@"account_pagination_sequence"] = @{ @"lt" : accountPaginationSequence };
return mutableQuery;
}
Error Log (the app crashes on a limited amount of devices)
[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance