Objective-C Subscription predicate on ObjectId field

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

It looks like after the update to the latest SDK 10.44, this code works as expected:

[subscriptions addSubscriptionWithClassName:@"DealGeneratorSet" where:@"owner_id == %@", [[RLMObjectId alloc] initWithString:self.realmApp.currentUser.identifier error:nil]];

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.