How do I know which messages have their content already downloaded?

To get all messages that have all of the message parts available for consumption, use this:

// Setup the predicate
LYRPredicate *transferStatusPredicate = [LYRPredicate predicateWithProperty:@"parts.transferStatus" operator:LYRPredicateOperatorIsLessThanOrEqualTo value:@(LYRContentTransferDownloading)];
LYRCompoundPredicate *negatedPredicate = [LYRCompoundPredicate compoundPredicateWithType:LYRCompoundPredicateTypeNot subpredicates:@[transferStatusPredicate]];

// Setup the query
LYRQuery *query = [LYRQuery queryWithClass:[LYRMessage class]];
query.predicate = negatedPredicate;

// Fetch results
NSError *error = nil;
NSOrderedSet *messages = [self executeQuery:query error:&error];

// or use it in your query controller...
LYRQueryController *controller = [self.client queryControllerWithQuery:query error:nil];
Have more questions? Submit a request