{"id":1795,"url":"https://github.com/SvenTiigi/STLocationRequest","last_synced_at":"2025-08-06T14:31:19.863Z","repository":{"id":62454469,"uuid":"47451857","full_name":"SvenTiigi/STLocationRequest","owner":"SvenTiigi","description":"Request the Location Services via a 3D 360° flyover MKMapView 🗺","archived":true,"fork":false,"pushed_at":"2020-02-22T18:46:37.000Z","size":122335,"stargazers_count":637,"open_issues_count":0,"forks_count":53,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-20T00:48:00.918Z","etag":null,"topics":["3d-flyover","carthage","cocoapods","location-services","mapview","permissions","swift"],"latest_commit_sha":null,"homepage":"https://sventiigi.github.io/STLocationRequest/","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/SvenTiigi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://www.paypal.me/SvenTiigi"]}},"created_at":"2015-12-05T10:34:40.000Z","updated_at":"2024-10-17T02:34:37.000Z","dependencies_parsed_at":"2022-11-02T00:16:35.987Z","dependency_job_id":null,"html_url":"https://github.com/SvenTiigi/STLocationRequest","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvenTiigi%2FSTLocationRequest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvenTiigi%2FSTLocationRequest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvenTiigi%2FSTLocationRequest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SvenTiigi%2FSTLocationRequest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SvenTiigi","download_url":"https://codeload.github.com/SvenTiigi/STLocationRequest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228905547,"owners_count":17989781,"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":["3d-flyover","carthage","cocoapods","location-services","mapview","permissions","swift"],"created_at":"2024-01-05T20:15:55.984Z","updated_at":"2024-12-09T14:31:15.773Z","avatar_url":"https://github.com/SvenTiigi.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/SvenTiigi/STLocationRequest/gh-pages/readMeAssets/STLocationRequest_Logo.png\" alt=\"Logo\" width=\"30%\"\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n\u003ch1 align=\"center\"\u003eSTLocationRequest\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://developer.apple.com/swift/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat\" alt=\"Swift 5.0\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://cocoapods.org/pods/STLocationRequest\"\u003e\n        \u003cimg src=\"https://img.shields.io/cocoapods/v/STLocationRequest.svg?style=flat\" alt=\"Version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat\" alt=\"Carthage Compatible\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://cocoapods.org/pods/STLocationRequest\"\u003e\n        \u003cimg src=\"https://img.shields.io/cocoapods/p/STLocationRequest.svg?style=flat\" alt=\"Platform\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://sventiigi.github.io/STLocationRequest\"\u003e\n        \u003cimg src=\"https://github.com/SvenTiigi/STLocationRequest/blob/gh-pages/badge.svg\" alt=\"Documentation\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://twitter.com/SvenTiigi/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Twitter-@SvenTiigi-blue.svg?style=flat\" alt=\"Twitter\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nSTLocationRequest is a simple and elegant way to request the users location services at the very first time. The `STLocationRequestController` shows a beautiful 3D 360° Flyover-MapView bult on top of [FlyoverKit](https://github.com/SvenTiigi/FlyoverKit) with over 25 cities and landmarks.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/SvenTiigi/STLocationRequest/gh-pages/readMeAssets/STLocationRequest.gif\" alt=\"Preview GIF\" width=\"70%\"\u003e\n\u003c/p\u003e\n\n## Installation\n\n### CocoaPods\n\nSTLocationRequest is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```bash\npod 'STLocationRequest'\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate STLocationRequest into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"SvenTiigi/STLocationRequest\"\n```\n\nRun `carthage update --platform iOS` to build the framework and drag the build:\n\n* `STLocationRequest.framework`\n* `FlyoverKit.framework` \n\ninto your Xcode project.\n\nOn your application targets’ “Build Phases” settings tab, click the “+” icon, choose “New Run Script Phase” and add the Framework paths (for all Frameworks) as mentioned in [Carthage Getting started Step 4, 5 and 6](https://github.com/Carthage/Carthage/blob/master/README.md)\n \n## Usage\n\n```swift\nimport STLocationRequest\n\n// Initialize STLocationRequestController with STLocationRequestController.Configuration\nlet locationRequestController = STLocationRequestController { (config: inout STLocationRequestController.Configuration) in\n    config.title.text = \"We need your location for some awesome features\"\n    config.allowButton.title = \"Alright\"\n    config.notNowButton.title = \"Not now\"\n    config.mapView.alpha = 0.9\n    config.backgroundColor = UIColor.lightGray\n    config.authorizeType = .requestWhenInUseAuthorization\n}\n\n// Get notified on STLocationRequestController.Events\nlocationRequestController.onEvent = { event in\n    if case .locationRequestAuthorized = event {\n        // Location Request Authorized 🙌\n    }\n}\n\n// Present STLocationRequestController\nlocationRequestController.present(onViewController: self)\n```\n\u003e Please keep in mind that the 3D flyover view will only work on a real iOS device ([Read more](#ios-simulator)).\n\n## Configuration\nThe `STLocationRequestController` can be customized via the the `STLocationRequestController.Configuration` struct. There are plenty of options available 👨‍💻 More details can be found [here](http://sventiigi.github.io/STLocationRequest/Classes/STLocationRequestController/Configuration.html)\n\n## OnEvent\nThe `onEvent` function get invoked if an `STLocationRequestController.Event` occured. Simply set an anonymous function of type `(Event) -\u003e Void` to evaluate the event.\n\n```swift\nlocationRequestController.onEvent = { (event: STLocationRequestController.Event) in\n    switch event {\n        case .locationRequestAuthorized:\n            break\n        case .locationRequestDenied:\n            break\n        case .notNowButtonTapped:\n            break\n        case .didPresented:\n            break\n        case .didDisappear:\n            break\n    }\n}\n```\n\n## Info.plist\n\nTo perform a location request, define a usage description in your `Info.plist` file.\n\nSTLocationRequestController.Authorization.**requestWhenInUseAuthorization**\n```swift\n\u003ckey\u003eNSLocationWhenInUseUsageDescription\u003c/key\u003e\n\u003cstring\u003eThe usage description\u003c/string\u003e\n```\n\nSTLocationRequestController.Authorization.**requestAlwaysAuthorization**\n```swift\n\u003ckey\u003eNSLocationAlwaysUsageDescription\u003c/key\u003e\n\u003cstring\u003eThe usage description\u003c/string\u003e\n```\n\nThe usage description will be shown in the default iOS location request dialog after the user taps the allow button.\n\n## Presenting-Recommendation\n\nThe recommended way to present `STLocationRequestController` is:\n\n```swift\nif STLocationRequestController.shouldPresentLocationRequestController {\n    // Location Services are enabled and authorizationStatus is notDetermined\n    // Ready to present STLocationRequestController\n    self.presentLocationRequestController()\n}\n```\n\n## iOS Simulator\n\nPlease keep in mind that the 3D flyover view will only work on a real iOS device with at least iOS 9.0 installed ([Apple Developer API Reference](https://developer.apple.com/reference/mapkit/mkmaptype/1452553-satelliteflyover)). A Screenshot taken from an **iOS Simulator** running a `STLocationRequestController` visualizes the iOS Simulator behaviour.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/SvenTiigi/STLocationRequest/gh-pages/readMeAssets/iOSSimulatorBehavior.jpg\" alt=\"iOSSimulatorBehavior\" title=\"iOSSimulatorBehavior\" width=300\u003e\n\u003c/p\u003e\n\n## Dependencies\n`STLocationRequest` uses the following libraries.\n\n+ [FlyoverKit](https://github.com/SvenTiigi/FlyoverKit)\n+ [SwiftPulse](https://github.com/ctews/SwiftPulse)\n\n## Contributing\nContributions are very welcome. 🙌 🤓\n\n## Example Application\nTo run the example Application, generate the Frameworks via `Carthage` first.\n\n```bash\n$ carthage update --platform iOS\n$ open STLocationRequest.xcodeproj\n```\n\n## License\n\n```\nSTLocationRequest\nCopyright (c) 2020 Sven Tiigi \u003csven.tiigi@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","funding_links":["https://www.paypal.me/SvenTiigi"],"categories":["Permissions","Libs","Map","Swift","Location [🔝](#readme)"],"sub_categories":["Other Parsing","Location","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSvenTiigi%2FSTLocationRequest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSvenTiigi%2FSTLocationRequest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSvenTiigi%2FSTLocationRequest/lists"}