From 566d8edeab9b2890a0fd746d0667c527f264a41c Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Mon, 29 Jun 2026 15:11:15 +0100 Subject: [PATCH] Fix a bug where scanning a universal link as a QR code would open the app without handling the link. (#5804) --- ElementX/Sources/Application/Application.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ElementX/Sources/Application/Application.swift b/ElementX/Sources/Application/Application.swift index 16867ed01..fb3bd67f3 100644 --- a/ElementX/Sources/Application/Application.swift +++ b/ElementX/Sources/Application/Application.swift @@ -46,6 +46,12 @@ struct Application: App { .onOpenURL { url in openURL(url, isExternalURL: true) } + .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) { userActivity in + // Universal Links opened from the Camera app's QR scanner (and NFC tags) are + // delivered as a browsing-web user activity rather than through `onOpenURL` 🤷‍♂️ + guard let url = userActivity.webpageURL else { return } + openURL(url, isExternalURL: true) + } .onContinueUserActivity("INStartVideoCallIntent") { userActivity in // `INStartVideoCallIntent` is to be replaced with `INStartCallIntent` // but calls from Recents still send it ¯\_(ツ)_/¯