MKMapViewDelegate no longer supported?

Hi all,


I have an app that was using MKMapViewDelegate to ask for location data. With AppleWatch 2.0, I am being told this delegate is no longer supported (along with startupdatinglocation). I assume this is because the watch is running independently now. So... my question is: how do I now ask for location information? Watch Connectivity, as I understand it, only works when the phone is actually running, but perhaps I can ask for background updates? Or is there another solution?


I hope there is a way around GPS location data, as a few of my apps need this to run.


Thanks!

Answered by cfc in 9521022

There was a talk on What's New in Core Location yesterday that covered it:


https://developer.apple.com/videos/wwdc/2015/?id=714


Also, Apple have posted a sample project on how to do it with watchOS 2.0:


https://developer.apple.com/library/prerelease/watchos/samplecode/PotLoc/Introduction/Intro.html#//apple_ref/doc/uid/TP40016176

To clarify, to make the app work, I have had to remove the MKMapViewDelegate, and also the startUpdatingLocation call. Now the app runs on the watch, but no maps are shown, and the location is not updated to the simulator's location.

Accepted Answer

There was a talk on What's New in Core Location yesterday that covered it:


https://developer.apple.com/videos/wwdc/2015/?id=714


Also, Apple have posted a sample project on how to do it with watchOS 2.0:


https://developer.apple.com/library/prerelease/watchos/samplecode/PotLoc/Introduction/Intro.html#//apple_ref/doc/uid/TP40016176

Awesome. Thank you! I'll give it a watch (ahem!). Hopefully it'll clear up all the new stuff. Much appreciated.

By the by, this core location talk was very useful and helped me figure out how to update locations. The talk, however, did not include how to update a WKInterfaceMap object in watchOS 2. Anyone know if there are docs and/or a session devoted to that?

MKMapViewDelegate no longer supported?
 
 
Q