Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webview can not be released when in ios #225

Closed
ber6789 opened this issue Dec 14, 2019 · 6 comments
Closed

webview can not be released when in ios #225

ber6789 opened this issue Dec 14, 2019 · 6 comments

Comments

@ber6789
Copy link

ber6789 commented Dec 14, 2019

flutter: latest version
ios: 12+
flutter_inappwebview: latest version

In the latest version (same as the old version) , the webviews that this plugin created in ios app, would never be released after the page is disposed , but in Android , it is ok.

image

I have noticed that you have created one method which intended to dispose webviews

(
looks like this:

  Future<void> dispose() async {
     Map<String, dynamic> args = <String, dynamic>{};
     if (Platform.isIOS){
      await _channel.invokeMethod('removeFromSuperview', args);
    }
  }

) ,but it seems not work properly when I use it , here are the steps and what happens:
(suppose webview is the instance of InAppWebViewController)

1、 call webview.dispose() and at the same time not leave this page
(just because if I leave this page at the same time, the dispose will not even work)

2、the app will Lost connect then crash in a moment

And by the way , If I just give it up , and not try to dispose these webviews, would they make a great influence on the performance on my ios app?

Sincerely,
forgive my poor English Expression ,and much heartfelt thanks for Looking into my issue

@ber6789
Copy link
Author

ber6789 commented Dec 14, 2019

I am just nearly breakdown on this issue , and my project will may not reach Acceptance due to this problem , is there anyone to help me?
在这个问题上,我已经崩溃很久了,项目也因为这个问题无法验收,要哭死了,有人可以帮忙解决下?

@pichillilorenzo
Copy link
Owner

I tried to remove the webview on iOS but I can't get it work. I don't know why but, also, if I remove all the references, the webview seems to still there (maybe there are some references that I can't get off).

I am just nearly breakdown on this issue , and my project will may not reach Acceptance due to this problem , is there anyone to help me?

Do you mean that the AppStore is rejecting your app? What they say?

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Dec 14, 2019

@ber6789 Also, if you use the official flutter plugin webview_flutter, do you get the same result? Or is the webview correctly disposed from memory?

@pichillilorenzo
Copy link
Owner

@ber6789 Ok I have finally found what was the problem! The fix will be available in the next release that is coming really soon! The iOS WebView will be released automatically like happens now for Android. Thanks a lot for the support!

@ber6789
Copy link
Author

ber6789 commented Dec 16, 2019

@ber6789 Ok I have finally found what was the problem! The fix will be available in the next release that is coming really soon! The iOS WebView will be released automatically like happens now for Android. Thanks a lot for the support!

thanks very very much , I was busy last two days, so I saw your reply just now, you are really my savior !! I love u so much , please accept my knees~, I am expecting your new version,,, you are really great man ~

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants