[iOS 26] iOS App Does Not Receive Deep Link from Widget When Using widgetAccentedRenderingMode on Image

Summary

When a SwiftUI widget uses a Link containing an Image modified with .widgetAccentedRenderingMode (using any mode except .fullColor), tapping the image on the widget launches the app but does not pass the expected deep link URL to the SceneDelegate.


Steps to Reproduce

  1. Create a SwiftUI Widget View with a Link:

    struct ImageView: View {
        var image: UIImage
    
        var body: some View {
            Link(URL(string: "myapp://image")!) {
                Image(uiImage: image)
                    .resizable()
                    .widgetAccentedRenderingMode(.accentedDesaturated) // or any mode other than .fullColor
                    .scaledToFill()
                    .clipped()
            }
        }
    }
    
  2. Add Custom URL Scheme in Info.plist:

    <dict>
        <key>CFBundleURLName</key>
        <string>com.company.myapp</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>myapp</string>
        </array>
    </dict>
    
  3. Implement Deep Link Handling in SceneDelegate:

    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        if let url = connectionOptions.urlContexts.first?.url {
            handle(url)
        }
    }
    
    func scene(_ scene: UIScene, openURLContexts urlContexts: Set<UIOpenURLContext>) {
        if let url = urlContexts.first?.url {
            handle(url)
        }
    }
    
    private func handle(_ url: URL) {
        // Process URL here
    }
    
  4. Run the application on a device or simulator.

  5. Add the widget to the Home Screen.

  6. Tap the image inside the widget.


Expected Result

The application launches and receives the URL in SceneDelegate, as expected.

Actual Result

The application launches, but the URL is not passed to SceneDelegate.
Both connectionOptions.urlContexts and openURLContexts are empty.

To receive URLs in a particular scene within your app use the onOpenURL(perform:) modifier. You might also want to review Emoji Rangers: Supporting Live Activities, interactivity, and animations sample project and test if you're able to reproduce the issue.

Could you also share how you've setup your AppDelegate and SceneDelegate?

Funkybit found a workaround for this issue https://stackoverflow.com/a/79794250/2035054

Image(..)
  .widgetAccentedRenderingMode(.desaturated)
  .overlay {
    Link(destination: linkUrl) {
      Rectangle()
        .fill(.clear)
    }
  }

And based on this idea:

struct AccentedLink<Content: View>: View {
    let destination: URL
    var content: Content

    var body: some View {
        content.overlay {
            Link(destination: destination) {
                Rectangle()
                    .fill(.clear)
            }
        }
    }

    init(destination: URL, @ViewBuilder content: () -> Content) {
        self.destination = destination
        self.content = content()
    }
}

And then instead of Link we can use AccentedLink:

AccentedLink(destination: URL(string: "myapp://image")!) {
    Image(uiImage: image)
        .resizable()
        .widgetAccentedRenderingMode(.accentedDesaturated)
        .scaledToFill()
        .clipped()
    } 

This is indeed still an issue as of April 2026. Utilizing Link no longer works in iOS 26 despite having worked in prior versions of iOS. I was seeing the same behavior where tapping on my widget no longer invoked SceneDelegate.scene(_:openURLContexts:).

As a sanity check, I went through all my widgets and replaced the following

Link(destination: yourURL) {
  // Your Swift UI View Implementation
}

with the View.widgetURL(_:) modifier. Sure enough, upon switching to the widgetURL modifier, the SceneDelegate.scene(_:openURLContexts:) API in my SceneDelegate is now being invoked properly.

[iOS 26] iOS App Does Not Receive Deep Link from Widget When Using widgetAccentedRenderingMode on Image
 
 
Q