Partial Sync Didn't work


I want to sync Calendar Events only for the logged in user. Please have a look into my code

    RLMSyncUser *user = [RLMSyncUser currentUser];
    // Create the configuration
    NSURL *syncServerURL = [NSURL URLWithString: kRealmInstance];
    RLMRealmConfiguration *config = [RLMRealmConfiguration defaultConfiguration];
    RLMSyncConfiguration *syncConfig  = [[RLMSyncConfiguration alloc] initWithUser:user realmURL:syncServerURL];
    syncConfig.isPartial  = YES;
    config.syncConfiguration = syncConfig;
    [RLMRealmConfiguration  setDefaultConfiguration:config];
    RLMRealm *realm = [RLMRealm realmWithConfiguration:config error:nil];
    [realm subscribeToObjects:[CalendarEvent class] where:[NSString stringWithFormat:@"UserId == 74"] callback:^(RLMResults * _Nullable results, NSError * _Nullable error) {
        if (error) {
            // Handle Error
        } else {
            arrCalenderEvents = results;

It did’nt come into the success block.

Realm v3.3.0
([realm-core-5.4.0], [realm-sync-3.0.0])


@imhafeez Can you enable debug mode and share client and ROS side logs? It’s possible you are trying to open a full realm but mean to be syncing a reference realm - what is your syncServerURL and realm path? Is this the default Realm?


Yes its default Realm. But how you can make it different? do i need to create another realm for that? Use the same one without default config settings? Please guide. would be better if you send an example code.