CLLocation not having speed and course accessors?

CLLocation in watchKit has the following initializer:


- (instancetype)initWithCoordinate:(CLLocationCoordinate2D)coordinate
    altitude:(CLLocationDistance)altitude
    horizontalAccuracy:(CLLocationAccuracy)hAccuracy
    verticalAccuracy:(CLLocationAccuracy)vAccuracy
    course:(CLLocationDirection)course
    speed:(CLLocationSpeed)speed
    timestamp:(NSDate *)timestamp __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_2);


but it cannot access the course and the speed:

@property(readonly, nonatomic) CLLocationDirection course __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_2_2) __WATCHOS_PROHIBITED;
/
*  speed
* 
*  Discussion:
*    Returns the speed of the location in m/s. Negative if speed is invalid.
*/
@property(readonly, nonatomic) CLLocationSpeed speed __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_2_2) __WATCHOS_PROHIBITED;


Does this make sense? For me this does not make sense at all.


Even if I do not get from the core location manager a valid course and speed this prohibits that I pass these information from my iOS app to the watch app by using a CLLocation object.


What is the reason for this implementation? I think I will file a bug report (when the bug reporter is working again).

Replies

File a bug and tell me if I can upvote it. Putting this restriction on CLLocation seems silly. It already returns -1 if information is not available. If anyone knows the logic in why this restriction was added I'd be curious to know.

I have filed a bug report (#23156454) but you cannot upvote it, I believe. You may file an additional bug report to give it more importance.


I am also curious about the logic behind it...