Anyone see the issue here?
double latDouble = [latString doubleValue];
double lngDouble = [lngString doubleValue];
CGFloat dist = [self calcDiffDistance:latDouble withPostLng:lngDouble]; // Incompatible types in initialization
- (float)calcDiffDistance:(double)postLat withPostLng:(double)lon1
{
...
}
The typedef for CGFloat is double on a 64-bit system, and float on a 32-bit system. My guess is you're compiling on a 64-bit system, and are assigning a float return value to a double variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With