Home

Awesome

<h1 align="center"> Appz :iphone: <h6 align="center"> Deeplinking to external applications made easy </h6> </h1> <p align="center"> <img alt="Version" src="https://img.shields.io/badge/version-3.2.0-blue.svg"/> <a alt="Travis CI" href="https://travis-ci.org/SwiftKitz/Appz"> <img alt="Version" src="https://travis-ci.org/SwiftKitz/Appz.svg?branch=master"/> </a> <img alt="Swift" src="https://img.shields.io/badge/swift-5-orange.svg"/> <img alt="Platforms" src="https://img.shields.io/badge/platform-ios%20%7C%20watchos%20%7C%20tvos-lightgrey.svg"/> <a alt="Carthage Compatible" href="https://github.com/SwiftKitz/Appz#carthage"> <img alt="Carthage" src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat"/> </a> <img alt="Supported Apps" src="https://img.shields.io/badge/Apps-172-9600cd.svg"/> </p> <p align="center"> <img src="resources/Demo.gif"> </p>

Highlights

Features

You can try them in the playground shipped with the framework!

Concise syntax to trigger deep linking:


let app = UIApplication.shared
app.canOpen(Applications.Instagram())
app.open(Applications.AppStore(), action: .account(id: "395107918"))
app.open(Applications.AppSettings(), action: .open)

Transparent web fallback:

// In case the user doesn't have twitter installed, it will fallback to
// https://twitter.com/testUser/statuses/2
app.open(Applications.Twitter(), action: .status(id: "2",  screenName: "testUser"))

Add your applications:

// Applications are recommended to be part of the
// "Applications" namespace
extension Applications {
    // Define your application as a type that
    // conforms to "ExternalApplication"
    struct MyApp: ExternalApplication {

        typealias ActionType = Applications.MyApp.Action

        let scheme = "myapp:"
        let fallbackURL = ""
        let appStoreId = ""
    }
}
// Then, you define the actions your app supports
extension Applications.MyApp {

    enum Action: ExternalApplicationAction {

        case open

        // Each action should provide an app path and web path to be
        // added to the associated URL
        var paths: ActionPaths {

            switch self {
            case .open:
                return ActionPaths()
            }
        }
    }
}

app.open(Applications.MyApp(), action: .open)

Supported Apps (for now!):

AppActions
AirLaunchOpen
AliExpressOpen
AllCastOpen
AppleMapsOpen
AppSettingsOpen
AppStoreDeveloper, App, Rate App
AppleWatchOpen
AudibleOpen
AyahOpen
BehanceOpen, UserProfile
BNROpen
BoxOpen
BuzzfeedOpen
Calendars5Open
Camera360Open
CareemOpen
ChromecastOpen
CirclePayOpen, Request, Send
ClipsOpen
CnetOpen
CNNOpen
CurrencyOpen
DailyMotionOpen
DamaKingOpen
DayCostOpen
DayOneOpen
DiigoOpen
DocumentsOpen
DropboxOpen
DuolingoOpen
eBayOpen
EchofonOpen
EpsonOpen
EverypostOpen
EyeEmOpen
FacebookOpen, Profile, Notification, Feed, Page, Action
FaceTimeVideo Call
FaceTime audioAudio Call
FeedlyOpen
FileAppOpen
FindFriendsOpen
FindiPhoneOpen
FitbitOpen
FlickrOpen
FlipboardOpen
FlippsTVOpen
ForestOpen
FoursquareOpen
FriendlySocialOpen
GalleryOpen
GlympseOpen
GoogleCalendarOpen, CreateEvent
GoogleChromeOpen
GoogleDocsOpen
GoogleDriveOpen
GoogleEarthOpen
GoogleMailOpen
GoogleMapsOpen, Display Directions, Display Location, Search
GooglePhotosOpen
GooglePlusOpen
GoogleSheetsOpen
GoogleSlidesOpen
GoogleTranslateOpen
GroupeMeOpen
HeapoOpen
HootSuiteOpen
iBooksOpen
IMDbOpen, Search, Title, Boxoffice, Showtimes, Feature Coming Soon, Feature Best Picture, Feature Born Today, Top rated movies, Most popular movies.
iMovieOpen
INRIXTrafficOpen
InstagramOpen, Camera, Library, Media, Username, Location, Tag
InstapaperOpen
iShowsOpen
iTranslateOpen, Translate
iTunesUOpen
KakaoTalkOpen
KayakOpen
KeeperOpen
KikOpen
LastPassOpen
LineOpen
LinkedinOpen
MailCompose
MarktplaatsOpen
MarvisOpen
MeerkatOpen
MessagesSMS
MobileMouseOpen
MopicoOpen
MovesOpen
MusicOpen
MyFitnessPalOpen
NameSharkOpen
NetflixOpen
NotesOpen
NPORadioOpen
NU.nlOpen
NYTimesOpen
OneMorethingOpen
OneDriveOpen
OnePasswordOpen
OutlookOpen, Compose
PaypalOpen
PeriscopeOpen
PhoneOpen
PhotosOpen
PicCollageOpen
PinterestOpen, UserProfile, Search
PocketOpen
PodcastsOpen
QuoraOpen
RadiumOpen
RemindersAppOpen
RemoteOpen
RijnmondOpen
RoboFormOpen
RunKeeperOpen
ScannerProOpen
SimplenoteOpen
SkitchOpen
SkypeOpen
SlackOpen, Channel, Direct Message, Open File, Search
SnapchatOpen, Add
SnapseedOpen
Songpop2Open
SonosOpen
SoundflakeOpen
SparkCompose
StitcherRadioOpen
StravaOpen
SubwayKoreaOpen
SunriseCalendarOpen
SwarmOpen
Super-Stickman-Golf-2Open
TalabatOpen
TangoOpen
TedOpen
TelegramOpen, SMS, openFromID
TestFlightOpen
TinderOpen
TrelloOpen
TubexOpen
TumblrOpen, Dashboard, Explore, Activity, Blog, Tag
TweetbotTimeline, Post, Mentions, Lists, Retweets, Favorites, Messages, Status, Search, Profile, Follow, Unfollow, Favorite, Unfavorite, Retweet, List
TwitterStatus, UserHandle, UserId, List, Post, Search, Timeline, Mentions, Messages
TwitterrificOpen, MentionsView, MessagesView, FavoritesView, Search, TweetID, MessageID, Post, UserProfile
UberOpen
UnreadOpen
UstreamOpen
ViberOpen Calls Tab, Open Chats Tab
VideosOpen
ViewsOpen
VimeoOpen
VineOpen, Popular Timelines
VIPAccessOpen
VoxOpen
VoxerOpen
VSCOOpen
WalletOpen
WazeOpen, NavigateToDirection
WeChatOpen
WeiboOpen
WhatsAppOpen
WhydOpen
WikipanionOpen
WordPressOpen
WorkflowOpen
YammerOpen
YelpOpen, Search, Search Location, Search Category, Search Category Location, Business
YoutubeOpen, Open Video
FRILOpen

Getting Started

Configure Info.plist

You must add the schemes you want to use to your app's info.plist file under LSApplicationQueriesSchemes. See here for more.

Carthage

Carthage is fully supported. Simply add the following line to your Cartfile:

github "SwiftKitz/Appz"

Cocoapods

Cocoapods is fully supported. Simply add the following line to your Podfile:

pod 'Appz'

Submodule

For manual installation, you can grab the source directly or through git submodules, then simply:

Motivation

I've gone through way too much pain than I am willing to admit integrating deeplinking in my app. It is very easy to forget calling canOpenURL or missing a colon somewhere. Another pain point was savaging the web for all the different specs for different applications.

With this library, you can keep the external application deep linking spec separately and rest assured as it is open source and maintained by the wonderful github community!

Author

Mazyod (@Mazyod)

Contributors

This library could not have made it so far without the generous contributions of various developers!

License

Appz is released under the MIT license. See LICENSE for details.