https://github.com/gentique/gblocationmanager-singleton
Handy CLLocationManager singleton class.
https://github.com/gentique/gblocationmanager-singleton
cllocationmanager corelocation singleton-pattern swift
Last synced: 4 months ago
JSON representation
Handy CLLocationManager singleton class.
- Host: GitHub
- URL: https://github.com/gentique/gblocationmanager-singleton
- Owner: gentique
- License: mit
- Created: 2020-09-27T14:53:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-17T18:48:05.000Z (over 3 years ago)
- Last Synced: 2025-02-03T07:31:33.096Z (about 1 year ago)
- Topics: cllocationmanager, corelocation, singleton-pattern, swift
- Language: Swift
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GBLocationManager
GBLocationManager is a handy singleton class for CLLLocationManager.
## Installation
Copy paste the .swift class into your project.
## Usage
```swift
let locationManager = GBLocationManager.shared
```
## Protocol
```swift
protocol GBLocationManagerDelegate {
func didUpdateLocation(location: CLLocation)
func didFailWith(error: Error)
func authorizationStatusChanged(status: CLAuthorizationStatus)
}
```
## Convenience methods
```swift
func locationServices(shouldUpdate: Bool)
func requestLocationUpdate { (success, location) in }
func checkAuthorization()
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
[MIT](https://raw.githubusercontent.com/gentique/GBLocationManager-Singleton/master/LICENSE)