简体   繁体   中英

getting weird errors while trying to build ios app using flutter

this is my debug log

Automatically signing iOS for device deployment using specified development team in Xcode
project: P7NL527WV9
Running Xcode build...                                                  
Xcode build done.                                           75.6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
    7.1/ios/Classes/FlutterWebView.m:575:23: warning: 'requiresUserActionForMediaPlayback' is
    deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
            configuration.requiresUserActionForMediaPlayback = true;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          mediaTypesRequiringUserActionForPlayback
    In module 'WebKit' imported from
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
    7.1/ios/Classes/FlutterWebView.h:6:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneO
    S14.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:213:28:
    note: 'requiresUserActionForMediaPlayback' has been explicitly marked deprecated here
    @property (nonatomic) BOOL requiresUserActionForMediaPlayback
    API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(9.0, 10.0));
                               ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
    7.1/ios/Classes/FlutterWebView.m:587:23: warning: 'requiresUserActionForMediaPlayback' is
    deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
            configuration.requiresUserActionForMediaPlayback = false;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          mediaTypesRequiringUserActionForPlayback
    In module 'WebKit' imported from
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
    7.1/ios/Classes/FlutterWebView.h:6:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneO
    S14.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:213:28:
    note: 'requiresUserActionForMediaPlayback' has been explicitly marked deprecated here
    @property (nonatomic) BOOL requiresUserActionForMediaPlayback
    API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(9.0, 10.0));
                               ^
    2 warnings generated.
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
    7.1/ios/Classes/FlutterWebView.m:575:23: warning: 'requiresUserActionForMediaPlayback' is
    deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
            configuration.requiresUserActionForMediaPlayback = true;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          mediaTypesRequiringUserActionForPlayback
    In module 'WebKit' imported from
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
    7.1/ios/Classes/FlutterWebView.h:6:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneO
    S14.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:213:28:
    note: 'requiresUserActionForMediaPlayback' has been explicitly marked deprecated here
    @property (nonatomic) BOOL requiresUserActionForMediaPlayback
    API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(9.0, 10.0));
                               ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
    7.1/ios/Classes/FlutterWebView.m:587:23: warning: 'requiresUserActionForMediaPlayback' is
    deprecated: first deprecated in iOS 10.0 [-Wdeprecated-declarations]
            configuration.requiresUserActionForMediaPlayback = false;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          mediaTypesRequiringUserActionForPlayback
    In module 'WebKit' imported from
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.
    7.1/ios/Classes/FlutterWebView.h:6:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneO
    S14.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:213:28:
    note: 'requiresUserActionForMediaPlayback' has been explicitly marked deprecated here
    @property (nonatomic) BOOL requiresUserActionForMediaPlayback
    API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", ios(9.0, 10.0));
                               ^
    2 warnings generated.
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/SafariViewController/SafariBrowserOptions.swift:34:16: warning: unnecessary check
    for 'iOS'; enclosing scope ensures guard will always be true
                if #available(iOS 10.0, *) {
                   ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/SafariViewController/SafariBrowserOptions.swift:12:14: note: enclosing scope here
    public class SafariBrowserOptions: Options<SafariViewController> {
                 ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/SafariViewController/SafariViewController.swift:66:12: warning: unnecessary check
    for 'iOS'; enclosing scope ensures guard will always be true
            if #available(iOS 10.0, *) {
               ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/SafariViewController/SafariViewController.swift:12:14: note: enclosing scope here
    public class SafariViewController: SFSafariViewController, FlutterPlugin,
    SFSafariViewControllerDelegate {
                 ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/InAppBrowser/InAppBrowserWebViewController.swift:557:13: warning: setter for
    'statusBarStyle' was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]
                UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue:
                previousStatusBarStyle)!
                ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/InAppWebView/InAppWebView.swift:695:34: error: value of type 'WKPDFConfiguration'
    has no member 'rect'
                    pdfConfiguration.rect = CGRect(x: rect["x"]!, y: rect["y"]!, width:
                    rect["width"]!, height: rect["height"]!)
                    ~~~~~~~~~~~~~~~~ ^~~~
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/InAppWebView/InAppWebView.swift:698:9: error: cannot find 'createPDF' in scope
            createPDF(configuration: pdfConfiguration) { (result) in
            ^~~~~~~~~
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/InAppWebView/InAppWebView.swift:713:29: error: incorrect argument label in call
    (have 'completionHandler:', expected 'dataCompletionHandler:')
            createWebArchiveData(completionHandler: { (result) in
                                ^~~~~~~~~~~~~~~~~~
                                 dataCompletionHandler
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/InAppWebView/InAppWebView.swift:1237:33: error: extra arguments at positions #2,
    #3 in call
            super.evaluateJavaScript(javaScript, in: frame, in: contentWorld, completionHandler:
            completionHandler)
                                    ^
    WebKit.WKWebView:46:15: note: 'evaluateJavaScript(_:completionHandler:)' declared here
        open func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?,
        Error?) -> Void)? = nil)
                  ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/InAppWebView/InAppWebView.swift:1237:94: error: cannot convert value of type
    '((Result<Any, Error>) -> Void)?' to expected argument type '((Any?, Error?) -> Void)?'
            super.evaluateJavaScript(javaScript, in: frame, in: contentWorld, completionHandler:
            completionHandler)
                                                                                       ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/InAppWebView/InAppWebView.swift:1254:15: error: value of type 'WKWebView' has no
    member 'callAsyncJavaScript'
            super.callAsyncJavaScript(functionBody, arguments: arguments, in: frame, in:
            contentWorld, completionHandler: completionHandler)
            ~~~~~ ^~~~~~~~~~~~~~~~~~~
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/SafariViewController/SafariBrowserOptions.swift:34:16: warning: unnecessary check
    for 'iOS'; enclosing scope ensures guard will always be true
                if #available(iOS 10.0, *) {
                   ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/SafariViewController/SafariBrowserOptions.swift:12:14: note: enclosing scope here
    public class SafariBrowserOptions: Options<SafariViewController> {
                 ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/SafariViewController/SafariViewController.swift:66:12: warning: unnecessary check
    for 'iOS'; enclosing scope ensures guard will always be true
            if #available(iOS 10.0, *) {
               ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/SafariViewController/SafariViewController.swift:12:14: note: enclosing scope here
    public class SafariViewController: SFSafariViewController, FlutterPlugin,
    SFSafariViewControllerDelegate {
                 ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/Types/URLCredential.swift:14:25: warning: comparing non-optional value of type
    '[Any]' to 'nil' always returns true
            if certificates != nil {
               ~~~~~~~~~~~~ ^  ~~~
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/Util.swift:86:25: warning: 'spotlightSuggestion' was deprecated in iOS 10.0:
    renamed to 'WKDataDetectorTypes.lookupSuggestion'
                    return .spotlightSuggestion
                            ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/Util.swift:86:25: note: use 'WKDataDetectorTypes.lookupSuggestion' instead
                    return .spotlightSuggestion
                            ^~~~~~~~~~~~~~~~~~~
                            WKDataDetectorTypes.lookupSuggestion
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/Util.swift:121:31: warning: 'spotlightSuggestion' was deprecated in iOS 10.0:
    renamed to 'WKDataDetectorTypes.lookupSuggestion'
                if type.contains(.spotlightSuggestion) {
                                  ^
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/Util.swift:121:31: note: use 'WKDataDetectorTypes.lookupSuggestion' instead
                if type.contains(.spotlightSuggestion) {
                                  ^~~~~~~~~~~~~~~~~~~
                                  WKDataDetectorTypes.lookupSuggestion
    /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.2/i
    os/Classes/Util.swift:216:21: warning: immutable value 'j' was never used; consider replacing
    with '_' or removing it
                    for j in ipv6.count...8 {
                        ^
                        _
    Command CompileSwift failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Encountered error while building for device.

Seems to be a problem with an included dependency.

module 'WebKit' imported from /Users/bhbj/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2. 7.1/ios/Classes/FlutterWebView.h

Maybe you have imported a PDF webview package that is not compatible with iOS, or you need permissions to use it, normally you can add them in Info.plist file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM