• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 7 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ—Ί Conveniently launch directions in other iOS apps

Karte

Travis GitHub tag (latest SemVer)

Small library for opening a location or route in other popular iOS navigation apps.

Currently supported are Apple Maps, Google Maps, Citymapper, Transit, Lyft, Uber, Navigon, Waze, DB Navigator, Yandex.Navi and Moovit.

Know of any other navigation apps that can be opened via URL scheme or universal link? Please open an issue and/or PR πŸ™ƒ

Quick Start

Check if an app is installed.

if Karte.isInstalled(.citymapper) {
    print("Citymapper is installed πŸŽ‰")
}

Launch a specific app with directions.

let coordinate = CLLocationCoordinate2D(latitude: 52.5162746, longitude: 13.3755153)
let berlin = Karte.Location(name: "Brandenburger Tor Berlin", coordinate: coordinate)
Karte.launch(app: .googleMaps, destination: berlin)

Or directly present the user with an action sheet listing all installed navigation apps to pick from.

Karte.presentPicker(destination: location, presentOn: viewController)

If you need more control in how to present the action sheet (e.g. on an iPad), you can get a configured one from Karte without having it presented directly.

let alert = Karte.createPicker(destination: location)

.launch(), .presentPicker() and .createPicker() have a few extra parameters with default values set that you can change to your liking. Most important to note would be an origin location, which can of course also be specified. Leaving it blank defaults to the user's current location in most apps.

A mode of transport can also be specified, which would then filter unsupported apps from the picker. Be aware that trying to launch an app directly with a specific mode of transport will verify if the app supports that mode and throw a Karte.Error.unsupportedMode otherwise.

Caveat

Please be aware that for .isInstalled(), .presentPicker() and .createPicker() to work you will have to have added the necessary URL schemes to your app's Info.plist beforehand. See Apple's Docs for more info on this. The necessary URL schemes can be found here. You're still free to try and launch apps via Karte.launch(app:to:) regardless of registered URL schemes, although that obviously might result in nothing happening if the app isn't there. Don't forget that even Apple Maps can be "uninstalled" now πŸ˜‰

The section to add to your Info.plist should look like this:

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>comgooglemaps</string>
        <string>citymapper</string>
        <string>transit</string>
        <string>lyft</string>
        <string>uber</string>
        <string>navigon</string>
        <string>waze</string>
        <string>dbnavigator</string>
        <string>yandexnavi</string>
        <string>moovit</string>
    </array>

Installation

Karte is available through SwiftPM. Just copy https://github.com/kiliankoe/Karte into Xcode ✌️

Credits

This library is based on CMMapLauncher. Unfortunately development on that library seems to have been stopped, so this is a reimplementation in Swift including a few changes and other apps to make usage even more pleasant 😊

Authors

Kilian Koeltzsch, @kiliankoe

"Karte"?

It's German for "Map" and that seemed fitting πŸ€·β€β™€οΈ

More Repositories

1

swift-outdated

A swift subcommand for displaying when your dependencies (SwiftPM or Xcode) are out of date
Swift
341
star
2

CLISpinner

Swifty Terminal Spinner
Swift
217
star
3

vvo

🚏🚍 A collection of links and tools regarding the VVO/DVB network
Python
86
star
4

SwiftLibrary

πŸ” Search for swift packages right from your command line
Swift
84
star
5

iCalKit

πŸ“… Parse and generate iCalendar (.ics) files in Swift
Swift
62
star
6

ParkenDD

πŸš— iOS app for finding public parking lots
Swift
50
star
7

GeoJSON

🌍 Swift types for working with GeoJSON data
Swift
43
star
8

Alfred

Build awesome Alfred workflows with Swift!
Swift
37
star
9

arbeitszeitnachweis

πŸ•‘ Arbeitszeitnachweis gem. Mindestlohngesetz
JavaScript
32
star
10

MensaDresden

🌯 See what's for lunch at Dresden's canteens
Swift
27
star
11

CircularCheckmarkProgress

A circular ProgressViewStyle with a checkmark βœ…
Swift
22
star
12

catchmybus

🚌 DVB info in the OS X menubar
Swift
22
star
13

DVB

πŸš† Query Dresden's public transport system for current bus- and tramstop data in swift
Swift
22
star
14

HeadingIndicator

SwiftUI view that points towards a specific coordinate
Swift
19
star
15

HeartBattery

❀️ display the OS X battery state as hearts in the menubar
Swift
18
star
16

alfred_dvb

🚍 Find public transport departures in the VVO/DVB network from Alfred
Go
14
star
17

WikiTranslate

πŸ“– Use Wikipedia as a dictionary
Swift
13
star
18

pushover

πŸ“Œ Pushover API Wrapper in Swift
Swift
13
star
19

iOS-tidbits

List of fun little iOS tidbits
11
star
20

readnow

πŸ“– open a random link from your Safari reading list
Swift
10
star
21

VVWo

NLP-based public transport routing for the #odcDresden19 hackathon
Swift
9
star
22

cage

Sets your desktop wallpaper to the only viable option, e.g. Nicolas Cage.
Swift
9
star
23

Nextbike

🚲 Minimal wrapper for the Nextbike API listing all bike racks and available bike counts
Swift
9
star
24

Env

βœ‰οΈ schwifty environment variables
Swift
8
star
25

swift-log-matrix

Send Swift logs directly to a Matrix room
Swift
8
star
26

Initiative

🎲⌚️ DnD dice roller on your wrist
Swift
7
star
27

isapplepayavailableingermanyyet.com

HTML
7
star
28

Zalgo

Convert text to and from Zalgo
Swift
6
star
29

docker-swift-runtime

(relatively) small docker image to run swift binaries
6
star
30

slackstats

πŸ“Š Have some fun with data exported from your Slack workspaces
Jupyter Notebook
6
star
31

EmealKit

πŸŽ“ Studentenwerk Dresden
Swift
6
star
32

mitbewohnervereinbarung

🏠
6
star
33

OneTrueGod

'cause running arbitrary code is fun!
Ruby
5
star
34

moneymoney-emeal

πŸ’Έ MoneyMoney extension for Studentenwerk Dresden's Emeal Kartenservice
Lua
5
star
35

OpenMensaKit

πŸ› Query OpenMensa for canteen and meal data
Swift
5
star
36

scpbook

πŸ““ a pdf/epub version of the scp database
TeX
5
star
37

location

πŸ—Ί cli to get your device's physical location and output it as json.
Swift
5
star
38

ParkKit

🚘 ParkAPI wrapper
Swift
5
star
39

alfred_mensa

🍲 Easy access to today's meals in Dresden's canteens via Alfred
Go
5
star
40

emeal-server

🌯 Scraping Dresden's canteens for juicy meal data
Swift
5
star
41

shortcuts

🏎 shortcuts for use with the iOS app Shortcuts
4
star
42

gausskrueger

🌐 Convert GK4 coordinates to WGS84, and vice versa
Swift
4
star
43

alfred_crates

πŸ“¦ Search crates.io right from within Alfred
Rust
4
star
44

Trias

🚏 TRIAS client library
Swift
4
star
45

tiddlyapi

🧠 tiny little JSON api for accessing tiddlywiki data
Python
4
star
46

HTWDresdenBot

πŸ“š HTWDresden Telegram Bot
Python
3
star
47

cv

πŸ“„ curriculum vitae
TeX
3
star
48

notification

πŸ›Ž tiny CLI tool to read all or certain NSNotifications on macOS
Swift
3
star
49

Corkboard

πŸ“Œ pinboard.in API wrapper
Swift
3
star
50

dotfiles

πŸ”§ These are my dotfiles. There are many like them, but these ones are mine.
Shell
3
star
51

WatchDVB

⌚Current DVB departure times on your wrist
Swift
3
star
52

oepnvdresdenbot

🚌 get public transport information in Dresden via Telegram
Python
3
star
53

minesweeper-solver

old and very abandoned WIP java tool to win at minesweeper
Java
2
star
54

grades.py

πŸ“š Fetch your current grades @ HTW Dresden
Python
2
star
55

simpledvb

Simple interaction with Dresden's public transport
CSS
2
star
56

blog

πŸ“ me writing stuff
Shell
2
star
57

AbfahrtsTV

πŸ“Ί DVB/VVO departures on your TV
Swift
2
star
58

isteduroamnochkaputt.de

HTML
2
star
59

dvbrb

🚌 Query Dresden's public transport system for current bus- and tramstop data in ruby
Ruby
2
star
60

hubot-clarifai2

πŸŒ‡ Hubot script for clarifai
CoffeeScript
2
star
61

emeal_old

🍝 iOS companion for your daily TU Dresden canteen visit
Swift
2
star
62

du-dresden

πŸŽ“ automatic translation for the homepage, twitter and facebook of the TU Dresden
Python
2
star
63

versammlungen-in-dresden

Mastodon bot for public assemblies in Dresden, Germany
TypeScript
2
star
64

RSS-deprecated

C
2
star
65

Cheerlights

πŸ”΅ Display the current Cheerlights color in your Mac's menubar
Swift
2
star
66

BTCheck

πŸ’Έ iOS app for quickly checking a QR encoded BTC address' balance
Swift
2
star
67

CNKit

πŸ—Ί Campus Navigator API wrapper
Swift
2
star
68

Notify

πŸ”” Send desktop notifications
Swift
2
star
69

blog_old

[deprecated] my blog, powered by octopress
JavaScript
2
star
70

Claudio

Tiny graphical wrapper around a single ffmpeg conversion
Swift
2
star
71

exercism

πŸ’‘my solutions for exercism.io
Swift
1
star
72

HTWDresden

swifty wrapper for the HTWDresden APIs - just a playground πŸ˜‰
Swift
1
star
73

vvwo_backend

Python
1
star
74

Haversine

πŸ—Ί Calculate the Haversine distance between two coordinate pairs.
Swift
1
star
75

kilian.io

πŸ‘‹ my personal homepage
HTML
1
star
76

AnybarSwift

A minimal swift package for talking to AnyBar
Swift
1
star
77

alfred_n26

πŸ’³ Access your N26 account from Alfred
JavaScript
1
star
78

openmensa

🍴Golang wrapper for the OpenMensa API
Go
1
star
79

naubino

1
star
80

Scribble

🎧 Scrobble your iTunes tracks to Last.fm
Swift
1
star
81

swdd

πŸŽ“ Studentenwerk Dresden
Go
1
star
82

Knack

1
star
83

D20

🎲 Evaluate dice notation in Swift
Swift
1
star
84

isswiftopensourceyet.com

Is Swift open source yet?
HTML
1
star
85

fachschaftsr.at

HTML
1
star
86

alfred.cr

🎩 Create Alfred workflows in Crystal with ease
Crystal
1
star
87

triassic-swift

Swift TRIAS client library
Swift
1
star
88

scpscraper

scrape contents of the SCP wiki
Python
1
star
89

crates_search

πŸ“¦ Search for crates from within Rust.
Rust
1
star
90

scribbler

quick and dirty scrobbling to the last.fm api
Python
1
star
91

minister.kilian.io

πŸ™
HTML
1
star
92

lord.kilian.io

πŸ‘‘
HTML
1
star