Coder Social home page Coder Social logo

luccifer / locationcore Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 6 KB

Working singleton for many projects with maximised power of GPS module

License: MIT License

Swift 100.00%
cllocationmanager singleton cllocation cllocationcoordinate2d ios swift

locationcore's Introduction

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

locationcore's People

Contributors

luccifer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

drougojrom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.