I need to fetch the user current location for the WatchKit App in watchOS 2. How do I do this?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- back button text does not change
- iOS (objective-c) compression_decode_buffer() retu
- how to find the index position of the ARRAY Where
相关文章
- 现在使用swift开发ios应用好还是swift?
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- didBeginContact:(SKPhysicsContact *)contact not in
- Custom Marker performance iOS, crash with result “
- Why is my library not able to expand on the CocoaP
The other answers are incorrect. You can request location directly on the watch for watch OS2. The available method is called
requestLocation
. It allows you to request a single location update.E.g.
Then where you want to request location:
Then you will get a single callback in one of the following
CLLocationManagerDelegate
methods.See the WWDC15 video "What's New in Core Location" - https://developer.apple.com/videos/wwdc/2015/?id=714