Latest 1.1.0
Homepage https://github.com/naveenrana1309/NRLocationManager
License MIT
Platforms ios 10.0
Authors

Version
License
Platform
ScreenShot

Introduction

NRLocationManager: This class is used to provide a location updates via completion handler. Some of the main features of this library are:
1) One time Location
2) Continous Location
3) Significant Location
4) Check System location is on/off

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Xcode 9+ , Swift 4 , iOS 9 and above

Plist Keys & Background Mode

Please make sure you have the below keys in your plist file before using the location services.

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Description</string>

<key>NSLocationAlwaysUsageDescription</key>
<string>Will you allow this app to always know your location?</string>

<key>NSLocationWhenInUseUsageDescription</key>
<string>Do you allow this app to know your current location?</string>

Also enable background mode for location :
UIBackgroundModes -> Location updates

Installation

NRLocationManager is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "NRLocationManager"

Usage

One Time Location

@IBAction func oneTimeLocationButtonPressed() {
updateLabel(string: "One Time Location ...")
NRLocationManger.shared.fetchLocation(locationType: .onetime) { (location, error) in
if error != nil {

} }
}

Continuos Location

@IBAction func oneTimeLocationButtonPressed() {
updateLabel(string: "One Time Location ...")
NRLocationManger.shared.fetchLocation(locationType: .continous) { (location, error) in
if error != nil {

}}
}

Significant Location

@IBAction func oneTimeLocationButtonPressed() {
updateLabel(string: "One Time Location ...")
NRLocationManger.shared.fetchLocation(locationType: .significant) { (location, error) in
if error != nil {

}}
}

Contributing

Contributions are always welcome! (:

  1. Fork it ( http://github.com/naveenrana1309/NRLocationManager/fork )
  2. Create your feature branch (‘git checkout -b my-new-feature’)
  3. Commit your changes (‘git commit -am ‘Add some feature’)
  4. Push to the branch (‘git push origin my-new-feature’)
  5. Create new Pull Request

Compatibility

Xcode 9+ , Swift 4 , iOS 10 and above

Author

Naveen Rana. See Profile

Email:
[email protected]

Check out Facebook Profile for detail.

License

NRLocationManager is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "NRLocationManager",
    "version": "1.1.0",
    "summary": "This class is used to provide a location updates via completion handler.",
    "swift_version": "4.0",
    "description": "NRLocationManager: This class is used to provide a location updates via completion handler.Some of the main features this library provide are:n* One time Locationn* Continous Locationn* Significant Locationn* Check System location is on/off.",
    "homepage": "https://github.com/naveenrana1309/NRLocationManager",
    "screenshots": "https://cdn.rawgit.com/naveenrana1309/NRLocationManager/master/Example/sample.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "naveenrana1309": "[email protected]"
    },
    "source": {
        "git": "https://github.com/naveenrana1309/NRLocationManager.git",
        "tag": "1.1.0"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "NRLocationManager/Classes/**/*"
}

Pin It on Pinterest

Share This