CLLocation.distance(from:) inconsistent across platforms

Originator:kamil.borzym
Number:rdar://34557241 Date Originated:September 20 2017, 11:18 PM
Status:Open Resolved:
Product:iOS + SDK, macOS + SDK Product Version:
Classification:Serious Bug Reproducible:Always
 
Area:
Core Location

Summary:
`CLLocation.distance(from:)` returns inconsistent values across different platforms (iOS and macOS).

Steps to Reproduce:
{code}
import CoreLocation
let c1 = CLLocation(latitude: 51.1269942, longitude: 16.851781)
let c2 = CLLocation(latitude: 52.232855, longitude: 20.9211114)
let d = c1.distance(from: c2)
// on mac: d == 305826.9665969026
// on ios: d == 307123.6866843265
{code}

Expected Results:
`CLLocation.distance(from:)` should return the same results both on iOS and on macOS.

Actual Results:
`CLLocation.distance(from:)` returns different result on iOS and macOS.

Version/Build:
iOS 11, iOS 10, macOS 10.12.6 (16G29)

Configuration:
iPhone 7 Plus, iOS Simulator, Mac Book Pro

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!