Moh*_*ele 2 xcode ios swift flutter
我正在我的 flutter 应用程序中实现一个 YouTube 播放器,当我运行它时,构建将失败并抛出贬值错误。
\n我目前使用的是 2012 年中的 MacBook,所以我无法使用最新版本的 x 代码。我当前的版本是 Version 12.4 。因此,为了在 ios 上使用 flutter,我使用 flutter 2.5。
\n所以现在当我尝试使用 youtube 播放器时它不会构建应用程序。
\nXcode build done. 43.0s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n ** BUILD FAILED **\n\n\nXcode's output:\n\xe2\x86\xb3\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/InAppBrowser/InAppBrowserWebViewController.swift:562:13: warning: setter for 'statusBarStyle'\n was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]\n UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: previousStatusBarStyle)!\n ^\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/InAppWebView/InAppWebView.swift:521:31: warning: 'mediaPlaybackRequiresUserAction' was\n deprecated in iOS 9.0\n configuration.mediaPlaybackRequiresUserAction =\n options.mediaPlaybackRequiresUserGesture\n ^\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/InAppWebView/InAppWebView.swift:932:31: warning: 'mediaPlaybackRequiresUserAction' was\n deprecated in iOS 9.0\n configuration.mediaPlaybackRequiresUserAction =\n newOptions.mediaPlaybackRequiresUserGesture\n ^\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/InAppWebView/InAppWebViewOptions.swift:103:81: warning: 'mediaPlaybackRequiresUserAction' was\n deprecated in iOS 9.0\n realOptions["mediaPlaybackRequiresUserGesture"] =\n configuration.mediaPlaybackRequiresUserAction\n ^\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/MyCookieManager.swift:260:44: error: cannot call value of non-function type 'String?'\n domain = domainUrl.host()\n ^ ~~\n\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/MyCookieManager.swift:294:44: error: cannot call value of non-function type 'String?'\n domain = domainUrl.host()\n ^ ~~\n\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/Types/URLCredential.swift:14:25: warning: comparing non-optional value of type '[Any]' to\n 'nil' always returns true\n if certificates != nil {\n ~~~~~~~~~~~~ ^ ~~~\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/Util.swift:216:21: warning: immutable value 'j' was never used; consider replacing with '_'\n or removing it\n for j in ipv6.count...8 {\n ^\n _\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/InAppBrowser/InAppBrowserWebViewController.swift:562:13: warning: setter for 'statusBarStyle'\n was deprecated in iOS 9.0: Use -[UIViewController preferredStatusBarStyle]\n UIApplication.shared.statusBarStyle = UIStatusBarStyle(rawValue: previousStatusBarStyle)!\n ^\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/InAppWebView/InAppWebView.swift:521:31: warning: 'mediaPlaybackRequiresUserAction' was\n deprecated in iOS 9.0\n configuration.mediaPlaybackRequiresUserAction =\n options.mediaPlaybackRequiresUserGesture\n ^\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/InAppWebView/InAppWebView.swift:932:31: warning: 'mediaPlaybackRequiresUserAction' was\n deprecated in iOS 9.0\n configuration.mediaPlaybackRequiresUserAction =\n newOptions.mediaPlaybackRequiresUserGesture\n ^\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/InAppWebView/InAppWebViewOptions.swift:103:81: warning: 'mediaPlaybackRequiresUserAction' was\n deprecated in iOS 9.0\n realOptions["mediaPlaybackRequiresUserGesture"] =\n configuration.mediaPlaybackRequiresUserAction\n ^\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/MyCookieManager.swift:260:44: error: cannot call value of non-function type 'String?'\n domain = domainUrl.host()\n ^ ~~\n\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/MyCookieManager.swift:294:44: error: cannot call value of non-function type 'String?'\n domain = domainUrl.host()\n ^ ~~\n\n /Users/mobix/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.5.0+2/ios/\n Classes/Types/URLCredential.swift:14:25: warning: comparing non-optional value of type '[Any]' to\n 'nil' always returns true\n if certificates != nil {\n ~~~~~~~~~~~~ ^ ~~~\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n Command CompileSwift failed with a nonzero exit code\n note: Using new build system\n note: Building targets in parallel\n note: Planning build\n note: Constructing build description\n warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements\n use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in\n target 'Runner' from project 'Runner')\n\nCould not build the application for the simulator.\nError launching application on iPhone 12 Pro Max.\nRun Code Online (Sandbox Code Playgroud)\n我正在使用的包是youtube_player_flutter: ^8.0.0. 该消息指示在应用程序 Web 视图中。
if #available(iOS 10.0, *) {\n configuration.ignoresViewportScaleLimits = options.ignoresViewportScaleLimits\n \n var dataDetectorTypes = WKDataDetectorTypes.init(rawValue: 0)\n for type in options.dataDetectorTypes {\n let dataDetectorType = Util.getDataDetectorType(type: type)\n dataDetectorTypes = WKDataDetectorTypes(rawValue: dataDetectorTypes.rawValue | dataDetectorType.rawValue)\n }\n configuration.dataDetectorTypes = dataDetectorTypes\n \n configuration.mediaTypesRequiringUserActionForPlayback = options.mediaPlaybackRequiresUserGesture ? .all : []\n } else {\n // Fallback on earlier versions\n configuration.mediaPlaybackRequiresUserAction = options.mediaPlaybackRequiresUserGesture\n }\nRun Code Online (Sandbox Code Playgroud)\n以及应用程序网络视图选项
\nif #available(iOS 10.0, *) {\n realOptions["mediaPlaybackRequiresUserGesture"] = configuration.mediaTypesRequiringUserActionForPlayback == .all\n realOptions["ignoresViewportScaleLimits"] = configuration.ignoresViewportScaleLimits\n realOptions["dataDetectorTypes"] = Util.getDataDetectorTypeString(type: configuration.dataDetectorTypes)\n } else {\n realOptions["mediaPlaybackRequiresUserGesture"] = configuration.mediaPlaybackRequiresUserAction\n }\nRun Code Online (Sandbox Code Playgroud)\n我取消注释platform: ios, '9.0'并在最后替换为
post_install do |installer|\n installer.pods_project.targets.each do |target|\n flutter_additional_ios_build_settings(target)\n target.build_configurations.each do |config|\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'\n end\n end\nend\nRun Code Online (Sandbox Code Playgroud)\n替换这些可以解决其他错误(不包含在这个问题中),但它似乎不适用于这些。我怎样才能解决这个问题?我之前没用过xcode。
\n我的扑动医生
\n[\xe2\x9c\x93] Flutter (Channel stable, 2.5.3, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-ET)\n \xe2\x80\xa2 Flutter version 2.5.3 at /Users/mobix/Development/flutter\n \xe2\x80\xa2 Upstream repository https://github.com/flutter/flutter.git\n \xe2\x80\xa2 Framework revision 18116933e7 (1 year ago), 2021-10-15 10:46:35 -0700\n \xe2\x80\xa2 Engine revision d3ea636dc5\n \xe2\x80\xa2 Dart version 2.14.4\n\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)\n \xe2\x80\xa2 Android SDK at /Users/mobix/Library/Android/sdk\n \xe2\x80\xa2 Platform android-32, build-tools 32.1.0-rc1\n \xe2\x80\xa2 Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java\n \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)\n \xe2\x80\xa2 All Android licenses accepted.\n\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS\n \xe2\x80\xa2 Xcode at /Applications/Xcode.app/Contents/Developer\n \xe2\x80\xa2 Xcode 12.4, Build version 12D4e\n \xe2\x80\xa2 CocoaPods version 1.11.3\n\n[\xe2\x9c\x93] Chrome - develop for the web\n \xe2\x80\xa2 Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome\n\n[\xe2\x9c\x93] Android Studio (version 2020.3)\n \xe2\x80\xa2 Android Studio at /Applications/Android Studio.app/Contents\n \xe2\x80\xa2 Flutter plugin can be installed from:\n https://plugins.jetbrains.com/plugin/9212-flutter\n \xe2\x80\xa2 Dart plugin can be installed from:\n https://plugins.jetbrains.com/plugin/6351-dart\n \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)\n\n[\xe2\x9c\x93] VS Code (version 1.72.0)\n \xe2\x80\xa2 VS Code at /Applications/Visual Studio Code.app/Contents\n \xe2\x80\xa2 Flutter extension version 3.50.0\n\n[\xe2\x9c\x93] Connected device (2 available)\n \xe2\x80\xa2 iPhone 12 Pro Max (mobile) \xe2\x80\xa2 63C29DC5-CD5A-411A-9BAA-C55FA3ED65B3 \xe2\x80\xa2 ios \xe2\x80\xa2\n com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)\n \xe2\x80\xa2 Chrome (web) \xe2\x80\xa2 chrome \xe2\x80\xa2 web-javascript \xe2\x80\xa2 Google Chrome\n 106.0.5249.119\n\n\xe2\x80\xa2 No issues found!\nRun Code Online (Sandbox Code Playgroud)\n提前致谢
\n| 归档时间: |
|
| 查看次数: |
7915 次 |
| 最近记录: |