I\'m simply trying to convert CLLocationCoordinates
into an NSValue
to be used in an array brought back later in my app. Here is my code:
I didn't see any need in coordinates
array. And you probably didn't initialised it.
Try:
_locationsArray = [NSMutableArray array];
for (CLLocation *location in self.locations) {
NSValue *locationValue = [NSValue valueWithMKCoordinate: location.coordinate];
[_locationsArray addObject:locationValue];
NSLog(@"location = %@", _locationsArray);
}