- Open the main project or workspace in Xcode.
- Go to
File > Add Packages.... - Enter the URL for this repository (https://github.com/Calindra/eitri-ios-geolocation) when prompted.
- Ensure the
EitriGeolocationproduct is added to the main target.
To use this module some configurations are needed
Add the following keys to the target's Info.plist, each with a user-facing explanation:
- Privacy - Location Always and When In Use Usage Description
- Privacy - Location Always Usage Description
- Privacy - Location When In Use Usage Description
To request only approximate accuracy by default, also set:
- Privacy - Location Default Accuracy Reduced - true
import GeolocationModule
// [...]
let eitriMachineContext = EitriMachineInstanceManager.start()
// get main eitri-machine instance
let mainEitriMachine = eitriMachineContext.mainMachine
// configure
mainEitriMachine.configure(
// configure params
)
//register modules
mainEitriMachine.modules.register(module: GeolocationModule())