martijnwalraven / meteor-ios

Meteor iOS integrates native iOS apps with the Meteor platform (http://www.meteor.com) through DDP
MIT License
741 stars 82 forks source link

how to subscribe a collection many times with difference parameters ? #89

Open nhattieunhatkiem opened 8 years ago

nhattieunhatkiem commented 8 years ago

Let say, when app first start, I do this subscribe [_subscriptionLoader addSubscriptionWithName:@"myCollection"]; it will return just a limited information.

And in next time, I want to get full information, I do this subscribe [_subscriptionLoader addSubscriptionWithName:@"myCollection" parameters:@[_id]];

how can I force core data to update with new results ? It keeps showing results from the first run.

yesitsdave commented 8 years ago

Core Data will update automatically, you can subscribe to the same publication as many times as you like with different parameters. If you are not seeing new results the problem is not with Core Data but with the way you are accessing the data or listening for updates.

nhattieunhatkiem commented 8 years ago

I checked my server code, it returned correct results I want. Do I need to do anything else to tell the core data to update new results ? or it will update automatically ?