0

I am using a WebView to simply display a Privacy Policy and Terms within an app. This was working with the latest Flutter version prior to upgrading to Flutter 2 today.

The error I'm getting is this: /Users/mymac/development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.2/ios/Classes/FlutterWebView.m:385:23: warning: 'mediaPlaybackRequiresUserAction' is deprecated: first deprecated in iOS 9.0 [-Wdeprecated-declarations] configuration.mediaPlaybackRequiresUserAction = true;

My iOS target is 10.0

My usage for WebView seems pretty basic and the error appears related to the package itself.

My usage is simply:

  child: WebView(
    initialUrl: aURL,
    ),

I've tried with:

webview_flutter: ^2.0.2

and

webview_flutter: ^1.0.7 // -- version used prior to Flutter 2

I'm hoping someone knows the solution to this or can point me in a better direction. I'm open to any suggestions. Thanks

UPDATE: It seems it's trying to compile for iOS 9.0 instead of 10.0. See attached 2 images. How can I force this to 10.0? MinimumOS Version error showing compiling for 9.0

1 Answer 1

1

Finally figured this out. Not exactly sure which step specifically solved the problem but here's the steps I took.

  1. Stopped Xcode (I had already done this and a flutter clean)
  2. Changed the sdk in pubspec.yaml to ">=2.12.0 <3.0.0"
  3. Pub get
  4. Loaded dependencies
  5. flutter clean
  6. Chose a different Simulator

Then I tried the example code and it worked. Tried my app and it worked (well, after correcting some null safety issues).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.