Post

Replies

Boosts

Views

Activity

Reply to iOS 14 crash in NSFetchedResultsController's indexPathForObject function
Below are some code snippet from my code base for better understanding. Fetch request for used for NSFetchedResultsController object: (NSFetchRequest *)fetchRequest { 		NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass([ABC class])]; 		request.predicate = [NSPredicate predicateWithFormat:@"id = %@ AND removed = NO", 												 [LMSAppDelegate sharedDelegate].module.cycleID]; 		request.returnsDistinctResults = YES; 		request.propertiesToFetch = @[@"xyz"]; 		request.resultType = NSDictionaryResultType; 		request.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"xyz" ascending:YES]]; 		return request; } Crashing code: (NSIndexPath *)indexPathForObject:(id)object { 		return [self.fetchedResultsController indexPathForObject:object]; }
Oct ’20