{"id":17084322,"url":"https://github.com/piemonte/position","last_synced_at":"2025-07-01T13:08:21.002Z","repository":{"id":56921460,"uuid":"20663059","full_name":"piemonte/Position","owner":"piemonte","description":"🛰 Lightweight location positioning in Swift","archived":false,"fork":false,"pushed_at":"2023-08-11T17:03:57.000Z","size":1227,"stargazers_count":87,"open_issues_count":2,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-15T09:37:14.413Z","etag":null,"topics":["bearing","cell","compass","corelocation","direction","geodesic","gps","ios","location","location-based-services","location-services","location-tracker","location-tracking","position","swift","swift-library","vcard","waypoint","waypoints","wifi"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piemonte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-06-09T21:36:09.000Z","updated_at":"2025-03-31T02:34:02.000Z","dependencies_parsed_at":"2024-01-14T09:00:20.014Z","dependency_job_id":null,"html_url":"https://github.com/piemonte/Position","commit_stats":{"total_commits":221,"total_committers":6,"mean_commits":"36.833333333333336","dds":0.3167420814479638,"last_synced_commit":"3d88f2de418eb9651a5b44acc6c3b0c28afc17f4"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/piemonte/Position","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piemonte%2FPosition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piemonte%2FPosition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piemonte%2FPosition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piemonte%2FPosition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piemonte","download_url":"https://codeload.github.com/piemonte/Position/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piemonte%2FPosition/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262969887,"owners_count":23392530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bearing","cell","compass","corelocation","direction","geodesic","gps","ios","location","location-based-services","location-services","location-tracker","location-tracking","position","swift","swift-library","vcard","waypoint","waypoints","wifi"],"created_at":"2024-10-14T13:06:45.854Z","updated_at":"2025-07-01T13:08:20.976Z","avatar_url":"https://github.com/piemonte.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"`Position` is a lightweight location positioning library for iOS.\n\n[![Build Status](https://travis-ci.com/piemonte/Position.svg?branch=master)](https://travis-ci.com/piemonte/Position) [![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square) [![Pod Version](https://img.shields.io/cocoapods/v/Position.svg?style=flat)](http://cocoadocs.org/docsets/Position/) [![Swift Version](https://img.shields.io/badge/language-swift%205.0-brightgreen.svg)](https://developer.apple.com/swift) [![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/piemonte/Position/blob/master/LICENSE)\n\n\n|  | Features |\n|:---------:|:---------------------------------------------------------------|\n| \u0026#9732; | “one shot” customizable location requests |\n| \u0026#127756; | distance and time-based location filtering |\n| \u0026#128752; | location tracking support |\n| \u0026#129517; | device heading support |\n| \u0026#128274; | permission check and response support |\n| \u0026#127760; | geospatial math utilities |\n| \u0026#127961; | place data formatting utilities |\n| \u0026#128202; | automatic low-battery location modes |\n| \u0026#128205; | vCard location creation |\n| \u0026#128301; | multiple component observer-based architecture |\n\n## Quick Start\n\n`Position` is available for installation using the [Swift Package Manager](https://www.swift.org/package-manager/) or the Cocoa dependency manager [CocoaPods](http://cocoapods.org/). Alternatively, you can simply copy the `Position` source files into your Xcode project.\n\n```ruby\n# CocoaPods\npod \"Position\", \"~\u003e 0.7.0\"\n\n# Carthage\ngithub \"piemonte/Position\" ~\u003e 0.7.0\n\n# SwiftPM\nlet package = Package(\n    dependencies: [\n        .Package(url: \"https://github.com/piemonte/Position\", majorVersion: 0)\n    ]\n)\n```\n\n## Usage\n\nThe sample project provides an example of how to integrate `Position`, otherwise you can follow these steps.\n\nEnsure your app’s `Info.plist` file includes both a location usage description, required device capability “location-services”, and  required background mode (if necessary).\n\nSee sample project for examples.\n\nImport the file and setup your component to be a PositionObserver, if you’d like it to be a delegate.\n\n```swift\nimport Position\n\nclass ViewController: UIViewController, PositionObserver {\n\t// ...\n```\n\nHave the component add itself as an observer and configure the appropriate settings.\n\n```swift\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        // ...\n\n        Position.shared.addObserver(self)\n        Position.shared.distanceFilter = 20\n\n        if Position.shared.locationServicesStatus == .allowedWhenInUse ||\n           Position.shared.locationServicesStatus == .allowedAlways {\n            Position.shared.performOneShotLocationUpdate(withDesiredAccuracy: 250) { (location, error) -\u003e () in\n                print(location, error)\n            }\n        } else {\n            // request permissions based on the type of location support required.\n            Position.shared.requestWhenInUseLocationAuthorization()\n            // Position.shared.requestAlwaysLocationAuthorization()\n        }\n    }\n```\n\nObserve delegation, if necessary.\n\n```swift\n    func position(position: Position, didChangeLocationAuthorizationStatus status: LocationAuthorizationStatus) {\n        // location authorization did change, often this may even be triggered on application resume if the user updated settings\n    }\n```\n\n**Remember** when creating location-based apps, respect the privacy of your users and be responsible for how you use their location. This is especially true if your application requires location permission `kCLAuthorizationStatusAuthorizedAlways`.\n\nTo share a location using a vCard, simply call the vCard function on any location object instance.\n\n```swift\n   let fileURL = location.vCard()\n```\n\n## Core Location Additions\n\nPosition is bundled with a variety of [additions to Core Location](https://github.com/piemonte/Position/blob/main/Sources/CoreLocation%2BAdditions.swift), such as geospatial math utilities. For example, one can calculation the direction between two coordinate points enabling [directional views](https://gist.github.com/piemonte/eb4bc7daef5b6359ec32b24b034f0c42) and other waypoint representations. \n\n## Documentation\n\nYou can find [the docs here](https://piemonte.github.io/Position). Documentation is generated with [jazzy](https://github.com/realm/jazzy) and hosted on [GitHub-Pages](https://pages.github.com).\n\n## Community\n\n- Need help? Use [Stack Overflow](http://stackoverflow.com/questions/tagged/position-swift) with the tag ‘position-swift’.\n- Questions? Use [Stack Overflow](http://stackoverflow.com/questions/tagged/position-swift) with the tag ‘position-swift’.\n- Found a bug? Open an [issue](https://github.com/piemonte/position/issues).\n- Feature idea? Open an [issue](https://github.com/piemonte/position/issues).\n- Want to contribute? Submit a [pull request](https://github.com/piemonte/position/pulls).\n\n## Resources\n\n* [Location and Maps Programming Guide](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html)\n* [Core Location Framework Reference](https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CoreLocation_Framework/index.html)\n* [Core Location – NSHipster](http://nshipster.com/core-location-in-ios-8/)\n\n## License\n\nPosition is available under the MIT license, see the [LICENSE](https://github.com/piemonte/Position/blob/master/LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiemonte%2Fposition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiemonte%2Fposition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiemonte%2Fposition/lists"}