I can't figure out why my data won't sort, I've read through the Firebase data sorting and I'm applying a query filter as shown below, but my data is not sorting correctly.
I want the data sorted based on when it was written into firebase and from my understanding I can do that based off the ChildAutoID key. So I'm using the queryOrderedByKey. It's sorting the data in a reverse order, most recent being at the bottom of my UITableView.
Please help!
Here is the structure of the data in Firebase, it's very basic.

-(void)loadDataFromFirebase
{
NSLog(@"LOAD DATA");
[self removeObservers:self];
Firebase* listRef = [[Firebase alloc] initWithUrl:@"firebaseurl/feed"];
[[listRef queryOrderedByKey] observeEventType:FEventTypeChildAdded withBlock:^(FDataSnapshot *snapshot)
{
NSDictionary *refNum = @{
@"ref" : snapshot.ref
};
[self.objectData addObject:snapshot.value];
[self.refData addObject:refNum];
[self.myTable reloadData];
}];
[listRef observeEventType:FEventTypeChildRemoved withBlock:^(FDataSnapshot *snapshot)
{
[self loadDataFromFirebase];
}];
}
queryOrderedByKeyshould indeed fireFEventTypeChildAddedevents in the order of the key. Unfortunately your code doesn't show enough data or information to determine what is going on. Can you set up a Firebase (e.g. 30009237.firebaseio-demo.com) with some sample data where the above code returns them in the wrong order?