Сообщение об ошибке:
Код: Выделить всё
/Users/user/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.4/ios/Classes/Launcher.swift:20:1: error: type 'UIApplication' does not conform to protocol 'Launcher'
extension UIApplication: Launcher {}
^
UIKit.UIApplication:24:15: note: candidate has non-matching type '(URL, [UIApplication.OpenExternalURLOptionsKey : Any], (@MainActor @Sendable (Bool) -> Void)?) -> Void'
open func open(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey : Any] = [:], completionHandler completion: (@MainActor @Sendable (Bool) -> Void)? = nil)
Обновил подфайл для использования iOS 12.0:
Код: Выделить всё
platform :ios, '12.0'
Код: Выделить всё
flutter clean
flutter pub get
cd ios
pod deintegrate
pod cache clean --all
pod install
Код: Выделить всё
dependencies:
flutter:
sdk: flutter
url_launcher: ^6.2.4
Я недавно обновил симулятор до версии 18.1 iPhone 16 Plus, и начали появляться различные ошибки. Предыдущая ошибка была:
Код: Выделить всё
suggests that the build process for your iOS app
in Xcode failed, and the main issue seems to be
that certain Flutter dependencies (e.g., sqflite)
are unable to locate Flutter.h
это полная ошибка
Код: Выделить всё
Writing result bundle at path:
/var/folders/cd/yh1682_95jz__1z337mbc0dh0000gp/T/flutter_tools.KNaYLQ/flutter_ios_build_temp_dir1iOiMu/temporary_xcresult_bundle
/Users/User/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.4/ios/Classes/Launcher.swift:20:1: error: type 'UIApplication' does not conform to protocol 'Launcher'
extension UIApplication: Launcher {}
^
UIKit.UIApplication:24:15: note: candidate has non-matching type '(URL, [UIApplication.OpenExternalURLOptionsKey : Any], (@MainActor @Sendable (Bool) -> Void)?) -> Void'
open func open(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey : Any] = [:], completionHandler completion: (@MainActor @Sendable (Bool) -> Void)? = nil)
^
/Users/User/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.4/ios/Classes/Launcher.swift:20:1: note: add stubs for conformance
extension UIApplication: Launcher {}
^
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'PromisesObjC' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'OrderedSet' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'path_provider_foundation-path_provider_foundation_privacy' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'nanopb' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'image_picker_ios-image_picker_ios_privacy' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'shared_preferences_foundation-shared_preferences_foundation_privacy' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'url_launcher_ios-url_launcher_ios_privacy' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'google_mobile_ads-google_mobile_ads' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'url_launcher_ios' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'shared_preferences_foundation' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'path_provider_foundation' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'GoogleUtilities' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'flutter_inappwebview' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'GoogleAppMeasurement' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'image_picker_ios' from project 'Pods')
note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'Flutter' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'Google-Mobile-Ads-SDK' from project 'Pods')
/Users/User/StudioProjects/Project/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 11.0, but the range of supported deployment target versions is 12.0 to 18.1.99. (in target 'GoogleUserMessagingPlatform' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 16 Plus.
Это единственный проект, который не работает, симулятор других проектов работает< /п>
Подробнее здесь: https://stackoverflow.com/questions/791 ... col-launch