CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.
TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✗ |
Maintained by David Elsonbaty.
Add the Localide Classes’ files to your project, or use CocoaPods:
pod 'Localide', '~> 1.1'
Firstly insert all Third Party Apps’ URL schemes to your Info.plist:
LSApplicationQueriesSchemes:
Info.plist should look like this.
let location = CLLocationCoordinate2D(latitude: 37.776692, longitude: 0.0)
Localide.sharedManager.promptForDirections(toLocation: location, { (usedApp, fromMemory, openedLinkSuccessfully) in
print("The user picked \(usedApp.name)")
}
rememberPreference
argument.usingASubsetOfApps
argument.You can launch the Apple Maps app with directions to location by using:
let location = CLLocationCoordinate2D(latitude: 37.776692, longitude: 0.0)
Localide.sharedManager.launchNativeAppleMapsAppForDirections(toLocation: location)
For other apps:
if LocalideMapApp.GoogleMaps.canOpenApp() {
let location = CLLocationCoordinate2D(latitude: 37.776692, longitude: 0.0)
LocalideMapApp.GoogleMaps.launchAppWithDirections(toLocation: location)
}