Skip to content

url_launcher / iOS: closeWebView doesn't work on WebkitVC #25721

@MagicalTux

Description

@MagicalTux

Steps to Reproduce

  1. Open a url with launch()
  2. attempt to close with closeWebView()
  3. nothing happens

Problem

In UrlLauncherPlugin.m around line 133, a completion handler is set that resets _currentSession to nil, however completion of presentViewController is called as completion of showing the viewcontroller, and not at the end of the web browsing.

As such, _currentSession is reset to nil almost immediately, and closeWebView() will do nothing.

I am guessing safariViewControllerDidFinish in the delegate should instead be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: url_launcherPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.platform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions