This PR contains all the work related to setting up this project as required to implement the [Assignment](https://repo.rock-n-code.com/rock-n-code/deep-linking-assignment/wiki/Assignment) on top, as intended. To summarise this work: - [x] created a new **Xcode** project; - [x] cloned the `Wikipedia` app and inserted it into the **Xcode** project; - [x] created the `Locations` app and also, its `Libraries` package; - [x] created the `Shared` package to share dependencies between the apps; - [x] added a `Makefile` file and implemented some **environment** and **help** commands. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: rock-n-code/deep-linking-assignment#1
26 lines
1.0 KiB
Swift
26 lines
1.0 KiB
Swift
import CoreLocation
|
|
|
|
// TODO: Remove these helpers after `WMFNearbyContentSource` is refactored to Swift and `LocationManager`
|
|
// is used only from Swift. It will also be possible to remove all @objc names from the
|
|
// `LocationManagerDelegate` declaration.
|
|
|
|
@objc public protocol LocationManagerProtocol {
|
|
/// Last known location
|
|
var location: CLLocation? { get }
|
|
/// Last known heading
|
|
var heading: CLHeading? { get }
|
|
/// Return `true` in case when monitoring location, in other case return `false`
|
|
var isUpdating: Bool { get }
|
|
/// Delegate for update location manager
|
|
var delegate: LocationManagerDelegate? { get set }
|
|
/// Get current locationManager permission state
|
|
var authorizationStatus: CLAuthorizationStatus { get }
|
|
/// Return `true` if user is aurthorized or authorized always
|
|
var isAuthorized: Bool { get }
|
|
|
|
/// Start monitoring location and heading updates.
|
|
func startMonitoringLocation()
|
|
/// Stop monitoring location and heading updates.
|
|
func stopMonitoringLocation()
|
|
}
|