Skip to content

Working singleton for many projects with maximised power of GPS module

License

Notifications You must be signed in to change notification settings

Luccifer/LocationCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

LocationCore

Working singleton for many projects with maximised power of GeoLocation

Installation

Simply drag and drop the LocationCore.swift file to your project

Useful methods

Start and stop location updates

// to start location updates just use the following method
Location.core.startUpdating()
// if you wanna to stop using location services
Location.core.stopUpdating()

Region monitoring

// to start monitoring any area simply use
 Location.core.monitorNewRegion(_ region: CLCircularRegion)
// and to stop monitoring them
 Location.core.stopMonitorRegion(_ region: CLCircularRegion)

Other

// To get the actual accuracy of geo signal
Location.core.getLocationAccuracy() -> String
// Cases: "No Signal", "Poor Signal", "Average Signal", "Full Signal"
// asuming the values of horizontalAccuracy in comparance with scheme:
// <0(No), >163(Poor) and >48(Average) and other values(Full)

Change configuration and getting values

To change any values of CLLocationManager configuration you should address the core.manager:

// to change activityType
Location.core.manager.activityType = .fitness

Or if you want to get any values from working core:

// gettin' monitors you are monitoring and didn't removed from observation
Location.core.manager.monitoredRegions

About

Working singleton for many projects with maximised power of GPS module

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages