You error is in this line of code:
NSArray* a = [m.stationList allKeys];
for (Station* s in a)
NSLog(@"%@", s.name); //line generating error
Because the array a
contain the key and the value of the dictionary. And since you set the key of the dicionary to station.name
array a
only contains strings and not atations.
Try:
NSArray* a = [m.stationList allValues];
for (Station* s in a)
NSLog(@"%@", s.name); //line generating error