Universal links for gitbay.org URLs !139

merged merged by cmc on 2026-09-30 02:19 UTC · krz/gitbay-ios:universal-links into main

Discussion

cmc

Adds applinks:gitbay.org and routes incoming gitbay.org links to existing screens.

  • WebURLRoute parses a URL into the existing route enums: owner (and /-/ pages: labels, milestones, snippets), repo, issues, MRs, builds, tree/blob/blame, commit, log, refs, compare, releases, milestones, labels, wiki. Segments are decoded after splitting, so %2F stays in a ref.
  • onOpenURL parks a routable link on PushRouter; ContentView's drain pushes it on the Dashboard stack under the current account if it is on the link's instance, otherwise switches to one that is.
  • Signed out: the link is kept and routed after sign-in.
  • Unroutable links, and links with no signed-in account on their instance, open in Safari (iOS does not route an app's own universal link back to it).

Only gitbay.org can be claimed: associated domains are fixed in the entitlement, so links to self-hosted instances keep opening in Safari.

Needs krz/gitbay!544 deployed with [web] apple_app_ids = ["ZCNAX3VL9D.org.gitbay.gitbay"] on gitbay.org, and the Associated Domains capability on the App ID (automatic signing with -allowProvisioningUpdates adds it).

Closes #20