Request the Location Services via a 3D 360° flyover MKMapView 🗺
This release adds Swift 5 and Xcode 10.2 support
Added Swift 4.2 compatibility
Added tvOS support
This release dropped custom LocationSymbolIcon support
Small bug fixes
Small Swift 4.1 updates 👨💻
The Engine of the STLocationRequestController
has been fully replaced with the newly released FlyoverKit.
The configuration for the allow
and not-now
button has been expanded. You can now set the following properties to customize the buttons to your needs.
With this release STLocationRequest
is also available via Carthage.
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate STLocationRequest into your Xcode project using Carthage, specify it in your Cartfile
:
github "SvenTiigi/STLocationRequest"
Run carthage update --platform iOS
to build the framework and drag the built STLocationRequest.framework
, SnapKit.framework
and SwiftIconFont.framwork
into your Xcode project.
On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase” and add the Framework paths (for all Frameworks) as mentioned in Carthage Getting started Step 4, 5 and 6
The STLocationRequestController.Configuration
struct has been slightly modified in order to have a consistent access to specific variables.
config.titleText // No longer available
config.title.text = "Use this 🙌"
Fixed a bug when STLocationRequestController
is presented from landscape orientation
The STLocationRequestController
has been completely refactored and improved. The most important changes are the construction and configuration for an STLocationRequestController
object as well as the new onEvent
closure property. The following usage code snippet will show how to migrate to the 3.0
version.
import STLocationRequest
// Initialize STLocationRequestController with STLocationRequestController.Configuration
let locationRequestController = STLocationRequestController { config in
config.titleText = "We need your location for some awesome features"
config.allowButtonTitle = "Alright"
config.notNowButtonTitle = "Not now"
config.mapViewAlpha = 0.9
config.backgroundColor = UIColor.lightGray
config.authorizeType = .requestWhenInUseAuthorization
}
// Get notified on STLocationRequestController.Events
locationRequestController.onEvent = { event in
if case .locationRequestAuthorized = event {
// Location Request Authorized 🙌
}
}
// Present STLocationRequestController
locationRequestController.present(onViewController: self)
The Objective-C support has been removed in this version to be compatible with the Swift coding standards. If you need to use the STLocationRequestController
inside an Objective-C Project you should bind the Pod to the 2.0
Version:
pod 'STLocationRequest', '~> 2.0'
STLocationRequest is now updated to version 2.0 🙌
Added Swift 4.0 compatibility