From db88432b9dddddb9101f768cdc78429af9635f45 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Mon, 18 Aug 2025 21:54:00 +0530 Subject: [PATCH] fix: update swift file to handle homeWidget deep link --- mobile/apps/photos/ios/Runner/AppDelegate.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mobile/apps/photos/ios/Runner/AppDelegate.swift b/mobile/apps/photos/ios/Runner/AppDelegate.swift index cbf287bc52..ea777b81ad 100644 --- a/mobile/apps/photos/ios/Runner/AppDelegate.swift +++ b/mobile/apps/photos/ios/Runner/AppDelegate.swift @@ -27,9 +27,12 @@ import workmanager // Retrieve the link from parameters if let url = AppLinks.shared.getLink(launchOptions: launchOptions) { - // We have a link, propagate it to your Flutter app or not - AppLinks.shared.handleLink(url: url) - return true // Returning true will stop the propagation to other packages + // only accept non-homewidget urls for AppLinks + if let host = url.host, !host.contains("&homeWidget") { + AppLinks.shared.handleLink(url: url) + // We have a link, propagate it to your Flutter app or not + return true // Returning true will stop the propagation to other packages + } } return super.application(application, didFinishLaunchingWithOptions: launchOptions)