https://github.com/luccifer/locationcore
Working singleton for many projects with maximised power of GPS module
https://github.com/luccifer/locationcore
cllocation cllocationcoordinate2d cllocationmanager ios singleton swift
Last synced: 11 months ago
JSON representation
Working singleton for many projects with maximised power of GPS module
- Host: GitHub
- URL: https://github.com/luccifer/locationcore
- Owner: Luccifer
- License: mit
- Created: 2016-09-18T09:38:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-01T20:39:01.000Z (over 8 years ago)
- Last Synced: 2025-01-13T12:49:01.131Z (about 1 year ago)
- Topics: cllocation, cllocationcoordinate2d, cllocationmanager, ios, singleton, swift
- Language: Swift
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```swift
// to start location updates just use the following method
Location.core.startUpdating()
```
```swift
// if you wanna to stop using location services
Location.core.stopUpdating()
```
## Region monitoring
```swift
// to start monitoring any area simply use
Location.core.monitorNewRegion(_ region: CLCircularRegion)
```
```swift
// and to stop monitoring them
Location.core.stopMonitorRegion(_ region: CLCircularRegion)
```
## Other
```swift
// 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:
```swift
// to change activityType
Location.core.manager.activityType = .fitness
```
Or if you want to get any values from working core:
```swift
// gettin' monitors you are monitoring and didn't removed from observation
Location.core.manager.monitoredRegions
```