Mobile Deep Links

The Twitch iOS and Android applications can be launched externally.

For support, visit the Twitch Developer Forums.

Is the Twitch App Installed?

You can check if the Twitch app is installed on the device as follows.

On iOS Objective C:

1
2
3
4
5
6
NSURL *twitchURL = [NSURL URLWithString:@"twitch://open"];
if ([[UIApplication sharedApplication] canOpenURL:twitchURL]) {
    // The Twitch app is installed, do whatever logic you need, and call -openURL:
} else {
    // The Twitch app is not installed. Prompt the user to install it!
}

On iOS Swift:

1
2
3
4
5
6
let twitchURL = NSURL(string: "twitch://open")
if (UIApplication.sharedApplication().canOpenURL(twitchURL!)) {
    // The Twitch app is installed, do whatever logic you need, and call -openURL:
} else {
    // The Twitch app is not installed. Prompt the user to install it!
}

On Android:

1
2
3
4
5
6
7
8
9
10
11
// Where “packagename” is the package name of the Twitch app:

private boolean isPackageInstalled(String packagename, Context context) {
    PackageManager pm = context.getPackageManager();
    try {
        pm.getPackageInfo(packagename, PackageManager.GET_ACTIVITIES);
        return true;
    } catch (NameNotFoundException e) {
        return false;
    }
}

Launching the Twitch App

If the Twitch app is installed on a device, URLs starting with twitch:// or ttv:// will run the app.

To launch the app: twitch://open

To launch the app and
go to a specific …
Use this URL
Game twitch://stream/<channel name>
– OR –
twitch://open?stream=<channel name>
Game directory twitch://game/<game name>
– OR –
twitch://open?game=<game name>
VOD twitch://video/<video ID>
– OR –
twitch://open?video=<video ID>

For a VOD with this URL:
twitch.tv/some_channel/v/1234567
the video_id is v1234567.
Channel activity feed (includes VODs) twitch://channel/<channel name>
– OR –
twitch://open?channel=<channel name>
User’s following directory twitch://following
If the user is not logged in, this goes to the login page.
Login page twitch://login