ios – flutter inappwebview warning in flutter

[ad_1]

i am implementing a youtube participant in my flutter app and when i run it the construct will fail and it throws deprication error.

i am presently utilizing macbook mid 2012, so i cannot use newest model of x code. my present model is at Model 12.4 . so as a way to use flutter for ios i am utilizing flutter 2.5.

so now when i attempt to use youtube participant it would not construct the app.

Xcode construct executed.                                           43.0s
Did not construct iOS app
Error output from Xcode construct:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/InAppBrowser/InAppBrowserWebViewController.swift:562:13: warning: setter for 'statusBarStyle'
    was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]
                UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: previousStatusBarStyle)!
                ^
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/InAppWebView/InAppWebView.swift:521:31: warning: 'mediaPlaybackRequiresUserAction' was
    deprecated in iOS 9.0
                    configuration.mediaPlaybackRequiresUserAction =
                    choices.mediaPlaybackRequiresUserGesture
                                  ^
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/InAppWebView/InAppWebView.swift:932:31: warning: 'mediaPlaybackRequiresUserAction' was
    deprecated in iOS 9.0
                    configuration.mediaPlaybackRequiresUserAction =
                    newOptions.mediaPlaybackRequiresUserGesture
                                  ^
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/InAppWebView/InAppWebViewOptions.swift:103:81: warning: 'mediaPlaybackRequiresUserAction' was
    deprecated in iOS 9.0
                    realOptions["mediaPlaybackRequiresUserGesture"] =
                    configuration.mediaPlaybackRequiresUserAction
                                                                                    ^
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/MyCookieManager.swift:260:44: error: can't name worth of non-function sort 'String?'
                            area = domainUrl.host()
                                               ^   ~~

    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/MyCookieManager.swift:294:44: error: can't name worth of non-function sort 'String?'
                            area = domainUrl.host()
                                               ^   ~~

    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/Varieties/URLCredential.swift:14:25: warning: evaluating non-optional worth of sort '[Any]' to
    'nil' all the time returns true
            if certificates != nil {
               ~~~~~~~~~~~~ ^  ~~~
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/Util.swift:216:21: warning: immutable worth 'j' was by no means used; take into account changing with '_'
    or eradicating it
                    for j in ipv6.rely...8 {
                        ^
                        _
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/InAppBrowser/InAppBrowserWebViewController.swift:562:13: warning: setter for 'statusBarStyle'
    was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]
                UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: previousStatusBarStyle)!
                ^
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/InAppWebView/InAppWebView.swift:521:31: warning: 'mediaPlaybackRequiresUserAction' was
    deprecated in iOS 9.0
                    configuration.mediaPlaybackRequiresUserAction =
                    choices.mediaPlaybackRequiresUserGesture
                                  ^
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/InAppWebView/InAppWebView.swift:932:31: warning: 'mediaPlaybackRequiresUserAction' was
    deprecated in iOS 9.0
                    configuration.mediaPlaybackRequiresUserAction =
                    newOptions.mediaPlaybackRequiresUserGesture
                                  ^
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/InAppWebView/InAppWebViewOptions.swift:103:81: warning: 'mediaPlaybackRequiresUserAction' was
    deprecated in iOS 9.0
                    realOptions["mediaPlaybackRequiresUserGesture"] =
                    configuration.mediaPlaybackRequiresUserAction
                                                                                    ^
    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/MyCookieManager.swift:260:44: error: can't name worth of non-function sort 'String?'
                            area = domainUrl.host()
                                               ^   ~~

    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/MyCookieManager.swift:294:44: error: can't name worth of non-function sort 'String?'
                            area = domainUrl.host()
                                               ^   ~~

    /Customers/mobix/Growth/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/
    Courses/Varieties/URLCredential.swift:14:25: warning: evaluating non-optional worth of sort '[Any]' to
    'nil' all the time returns true
            if certificates != nil {
               ~~~~~~~~~~~~ ^  ~~~
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    word: Utilizing new construct system
    word: Constructing targets in parallel
    word: Planning construct
    word: Establishing construct description
    warning: Capabilities for Signing & Capabilities might not operate accurately as a result of its entitlements
    use a placeholder staff ID. To resolve this, choose a growth staff within the Runner editor. (in
    goal 'Runner' from venture 'Runner')

Couldn't construct the applying for the simulator.
Error launching utility on iPhone 12 Professional Max.

the package deal i am utilizing is youtube_player_flutter: ^8.0.0. the message signifies to in app net view.

if #obtainable(iOS 10.0, *) {
                configuration.ignoresViewportScaleLimits = choices.ignoresViewportScaleLimits
                
                var dataDetectorTypes = WKDataDetectorTypes.init(rawValue: 0)
                for sort in choices.dataDetectorTypes  dataDetectorType.rawValue)
                
                configuration.dataDetectorTypes = dataDetectorTypes
                
                configuration.mediaTypesRequiringUserActionForPlayback = choices.mediaPlaybackRequiresUserGesture ? .all : []
            } else {
                // Fallback on earlier variations
                configuration.mediaPlaybackRequiresUserAction = choices.mediaPlaybackRequiresUserGesture
            }

and in app net view choices

if #obtainable(iOS 10.0, *) {
                realOptions["mediaPlaybackRequiresUserGesture"] = configuration.mediaTypesRequiringUserActionForPlayback == .all
                realOptions["ignoresViewportScaleLimits"] = configuration.ignoresViewportScaleLimits
                realOptions["dataDetectorTypes"] = Util.getDataDetectorTypeString(sort: configuration.dataDetectorTypes)
            } else {
                realOptions["mediaPlaybackRequiresUserGesture"] = configuration.mediaPlaybackRequiresUserAction
            }

i uncommented the platform: ios, '9.0' and exchange on the finish with

post_install do |installer|
  installer.pods_project.targets.every do |goal|
    flutter_additional_ios_build_settings(goal)
    goal.build_configurations.every do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    finish
  finish
finish

changing these labored the opposite error (which isn’t included on this query) however it would not appear to work for these. how am i able to repair this? i have never used xcode earlier than so.

my flutter physician

[✓] Flutter (Channel steady, 2.5.3, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-ET)
    • Flutter model 2.5.3 at /Customers/mobix/Growth/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (1 yr in the past), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart model 2.14.4

[✓] Android toolchain - develop for Android gadgets (Android SDK model 32.1.0-rc1)
    • Android SDK at /Customers/mobix/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Functions/Android Studio.app/Contents/jre/Contents/House/bin/java
    • Java model OpenJDK Runtime Atmosphere (construct 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Functions/Xcode.app/Contents/Developer
    • Xcode 12.4, Construct model 12D4e
    • CocoaPods model 1.11.3

[✓] Chrome - develop for the online
    • Chrome at /Functions/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (model 2020.3)
    • Android Studio at /Functions/Android Studio.app/Contents
    • Flutter plugin could be put in from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin could be put in from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java model OpenJDK Runtime Atmosphere (construct 11.0.10+0-b96-7281165)

[✓] VS Code (model 1.72.0)
    • VS Code at /Functions/Visible Studio Code.app/Contents
    • Flutter extension model 3.50.0

[✓] Related machine (2 obtainable)
    • iPhone 12 Professional Max (cell) • 63C29DC5-CD5A-411A-9BAA-C55FA3ED65B3 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (net)               • chrome                               • web-javascript • Google Chrome
      106.0.5249.119

• No points discovered!

thanks upfront

[ad_2]

Leave a Reply