Skip to content

Calindra/eitri-ios-geolocation

Repository files navigation

Eitri iOS Geolocation

Installation via Swift Package Manager (Xcode)

  1. Open the main project or workspace in Xcode.
  2. Go to File > Add Packages....
  3. Enter the URL for this repository (https://github.com/Calindra/eitri-ios-geolocation) when prompted.
  4. Ensure the EitriGeolocation product is added to the main target.

Location permission strings

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

Registering geolocation module

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())

How to use the module in your eitri-apps

Bifrost Geolocation API reference.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages