Skip to content

[url_launcher - iOS] After window.rootViewController reset launch url is not working #33259

@jkmathew

Description

@jkmathew

At some point I have to reset my application window's root view controller. After that, launch(url); from dart it is printing warning Warning: Attempt to present <SFSafariViewController: 0x7fc42e866c00> on <FlutterViewController: 0x7fc42e828e00> whose view is not in the window hierarchy! in the log.

Steps to reproduce.

  1. At any point reset windows root view controller.
  2. Call from dart after that.

From flutter/plugins repo, I could see that the url_launcher plugin native side is keeping rootviewcontroller while initialising the plugin

Code here:
https://github.com/flutter/plugins/blob/a3988f85689d3a35fc3f1ccd8c722d228305c969/packages/url_launcher/ios/Classes/UrlLauncherPlugin.m#L72-L89

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: url_launcherPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions