flutter icon indicating copy to clipboard operation
flutter copied to clipboard

webview_flutter: ^4.4.4 in ios not load url

Open anilthummar opened this issue 1 year ago • 1 comments

Steps to reproduce

i have below code for ios app load URL in my webview but its not load

void _loadWebUrl() {

    print("_ :${settingResponse.webUrl}");

    if ((settingResponse.webUrl ?? "").isNotEmpty) {
      showLoader(value: true);
      webController
        ..setJavaScriptMode(JavaScriptMode.unrestricted)
        ..loadRequest(Uri.parse((settingResponse.webUrl ?? "")))
        ..setNavigationDelegate(
          NavigationDelegate(
            onPageStarted: (String url) {
              DebugLog.i('Page started loading: $url');
            },
            onPageFinished: (String url) {
              DebugLog.i('Page finished loading: $url');
              isApiLoading.value = false;
              showLoader(value: false);
            },
            onNavigationRequest: (NavigationRequest request) {
              return NavigationDecision.navigate;
            },
          ),
        );
    }
  }

Expected results

some url not load in ios web view using webview_flutter: ^4.4.4 lib but in android its load and working so what is issue in lib , I have already update this lib version and check in iOS but still its not worked , can you please check, Thank you

Actual results

must be load url using webview_flutter: ^4.4.4 lib in ios device

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

anilthummar avatar Dec 20 '24 08:12 anilthummar

Hi @anilthummar, kindly share the link and a full sample so that we can properly investigate this. Please also check with some webview apps on the App Store to see if they're able to open the link. If they cannot open the link, then this is not an issue with the plugin.

Thank you

danagbemava-nc avatar Dec 20 '24 10:12 danagbemava-nc

Hi @anilthummar, kindly share the link and a full sample so that we can properly investigate this. Please also check with some webview apps on the App Store to see if they're able to open the link. If they cannot open the link, then this is not an issue with the plugin.

Thank you

Thank you @danagbemava-nc for your reply, I have used the below URL to load in web view as per I have mentioned web_view_flutter lib

Url I have used to load in ios device -https://jpstaging.usgme.club/

Thank you so much

anilthummar avatar Dec 23 '24 06:12 anilthummar

Hi @anilthummar, the version of webview_flutter you're using is old. Please upgrade to the latest version (4.10.0) to see if you still experience this issue.

If you do, please also provide the version of webview_flutter_wkwebview from your pubspec.lock.

Thank you

danagbemava-nc avatar Dec 30 '24 06:12 danagbemava-nc

Hi @anilthummar, the version of webview_flutter you're using is old. Please upgrade to the latest version (4.10.0) to see if you still experience this issue.

If you do, please also provide the version of webview_flutter_wkwebview from your pubspec.lock.

Thank you

I have use webview_flutter_wkwebview-3.16.0

anilthummar avatar Jan 06 '25 12:01 anilthummar

Hi @anilthummar, I just tested your url in 2 different native wkwebview apps and in both apps, the page is just blank. So this likely not an issue with the flutter plugin. However, I noticed that your webpage has a video that autoloads when the page starts, this might be affecting the loading of the page. Can you try removing it to see if it helps?

danagbemava-nc avatar Jan 07 '25 06:01 danagbemava-nc

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] avatar Jan 28 '25 07:01 github-actions[bot]

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, including the output of flutter doctor -v and a minimal reproduction of the issue.

github-actions[bot] avatar Feb 11 '25 08:02 github-actions[bot]