Mobile deep links

A deep link sends someone straight to a channel, a profile, a replay or a post. This page lists the links Xive supports and what each one does when the Xive app is installed and when it isn't.

The Xive app is on the App Store and Google Play. Its bundle id and package name are both com.thexive.app.

What works today

  • https links always work. Every link to https://thexive.com/… opens the right page on the website, on any device, whether or not the app is installed.
  • Android opens posts and Shorts in the app. When the app is installed, https://thexive.com/post/… and https://thexive.com/short/… open in the app (Android App Links). Every other https link opens the website.
  • iOS doesn't have universal links yet. Xive doesn't serve an apple-app-site-association file, so on iPhone and iPad every https link opens in the browser, even with the app installed.
  • The app has a custom scheme, xive://. It opens screens in the app directly, but only when the app is installed. Without the app, the link does nothing or shows an error.

Use https links. They work for everyone, and they will open the app on more platforms as Xive adds app-link support, with no change on your side. Use xive:// only inside your own app, after you've checked that Xive is installed.

Use the apex host, thexive.com. Links on www.thexive.com redirect to it, but Android can only verify app links on the apex host, so a www. link always opens the browser.

To openUse this https linkOpens the app?App-only link (xive://)
A channel (its live stream, or its page when offline) https://thexive.com/channel/<username> No, website None by username. See the next row.
A specific stream https://thexive.com/stream/<stream_id> No, website xive://stream/<stream_id>
A replay (one past broadcast) https://thexive.com/stream/<stream_id>?replay=1&session=<session_id> No, website xive://stream/<stream_id> opens the stream, but the app doesn't read session, so it can't pick one past broadcast.
A profile https://thexive.com/@<username> (or /profile/<username>) No, website xive://creator?id=<user_id> takes the user id, not the username.
A post https://thexive.com/post/<post_id> Android: yes. iOS: no. xive://post/<post_id>. Add ?comments=1 to open its comments.
A Short https://thexive.com/short/<short_id> Android: yes. iOS: no. xive://short/<short_id>
Live channels (browse) https://thexive.com/streams No, website xive://streams
Go Live (for creators) https://thexive.com/live-dashboard No, website xive://go-live opens the app's Go Live screen.
A Hub https://hub.thexive.com/hub/<hub_slug> No. Hubs aren't in the Xive app. None
“Add to channel” consent https://thexive.com/developers/authorize?client_id=…&scope=… No, website None
“Sign in with Xive” (OAuth) https://thexive.com/oauth2/authorize?client_id=… No, website None

Hubs have their own app, Xive Hub, which is separate from the Xive app. Its links aren't covered here. Link to Hubs over https.

Where the ids come from

Examples

A channel:

https://thexive.com/channel/nightowl

A profile:

https://thexive.com/@nightowl
xive://creator?id=3e0b8a51-2f4c-4f8e-9a6d-1b7c5e2d9f04      # app only

A replay:

https://thexive.com/stream/c71d0f2a-8b3e-4a19-b5d6-0e4f9a2c7b18?replay=1&session=15b4e0c2-7a3d-4f8b-9e61-2c0d5a8f3b74

A post:

https://thexive.com/post/8d2f6a1e-4b3c-4e7d-a5f0-9c1b2e3d4f56
xive://post/8d2f6a1e-4b3c-4e7d-a5f0-9c1b2e3d4f56?comments=1   # app only, comments open

Platform behaviour

Android

  • The app declares https://thexive.com/post/… and https://thexive.com/short/… as app links, and Xive publishes the matching /.well-known/assetlinks.json. When the app is installed and verified, those links open in the app without a chooser.
  • All other https paths open the browser.
  • xive:// links open the app when it's installed. Android shows an error or does nothing when it isn't.

iOS and iPadOS

  • No universal links yet: every https link opens Safari, or the in-app browser of the app it was tapped in.
  • xive:// links open the app when it's installed. If it isn't, Safari shows an error.

Desktop

There's no desktop app. https links open the website. xive:// links don't work on desktop.

Checking whether the app is installed

Only do this if you want to use xive:// links. Otherwise just use https links.

  • iOS: add xive to LSApplicationQueriesSchemes in your Info.plist, then call canOpenURL with a xive:// URL.
  • Android: check for the package com.thexive.app, declared in a <queries> element in your manifest (Android 11+), or resolve an intent for a xive:// URL.
// Swift
let url = URL(string: "xive://stream/\(streamId)")!
if UIApplication.shared.canOpenURL(url) {
    UIApplication.shared.open(url)
} else {
    UIApplication.shared.open(URL(string: "https://thexive.com/stream/\(streamId)")!)
}

Good practice

  • Share and store https links. A xive:// link is dead text to anyone without the app.
  • Link channels by username (/channel/<username>) for people, and by id for anything you store. Usernames can change. Ids don't.
  • Open the “Add to channel” and OAuth links in the system browser (ASWebAuthenticationSession on iOS, Custom Tabs on Android), not in a web view. The person signs in to Xive there.
  • Don't build links to other paths on thexive.com. Only the formats on this page are supported.