I am having trouble setting up a Realm Subscription using the ObjectId field in the where predicate. I tried all sorts of string combinations, and the error persisted. All my objects have owner_id of type ObjectID, and the user should sync only its objects.
Here is my code:
RLMRealmConfiguration *configuration = [self.realmApp.currentUser flexibleSyncConfigurationWithInitialSubscriptions:^(RLMSyncSubscriptionSet * _Nonnull subscriptions) {[subscriptions addSubscriptionWithClassName:@"DealGeneratorSet" where:@"owner_id = %@", self.realmApp.currentUser.identifier];} rerunOnOpen:true];
The error is always along those lines:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "owner_id = 650781f373e92d4da4f51073"'
terminating with uncaught exception of type NSException