Firebase iOS中不推荐使用颤振依赖项
我知道很多flatter开发人员在他们的应用程序中使用了很多不同的包。现在,我正试图在iOS上构建我的应用程序的最终版本,但这让我头疼。我使用的软件包包括图像选取器、颤振本地通知、颤振inappwebview、firebase消息等。由于firebase库的兼容性问题,我需要针对最小iOS 10.0。 这些是一些库的版本,当在模拟器上构建到iOS时会出现错误Firebase iOS中不推荐使用颤振依赖项,firebase,flutter,flutter-dependencies,Firebase,Flutter,Flutter Dependencies,我知道很多flatter开发人员在他们的应用程序中使用了很多不同的包。现在,我正试图在iOS上构建我的应用程序的最终版本,但这让我头疼。我使用的软件包包括图像选取器、颤振本地通知、颤振inappwebview、firebase消息等。由于firebase库的兼容性问题,我需要针对最小iOS 10.0。 这些是一些库的版本,当在模拟器上构建到iOS时会出现错误 image_picker: ^0.6.7+22 flutter_local_notifications: ^4.0.1 flutter_i
image_picker: ^0.6.7+22
flutter_local_notifications: ^4.0.1
flutter_inappwebview: ^4.0.0+4
# Only Firebase_messaging gives errors between Firebase libraries but
# I would like to show you the versions of all of them
firebase_admob: ^0.11.0+1
firebase_messaging:
firebase_core: ^0.7.0
firebase_auth: ^0.20.0+1
cloud_firestore: ^0.16.0
与firebase_消息相关的一小部分警告
In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/projectxyz-Flutter-App/projectxyz/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Li
brary/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been
explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin
.m:294:70: warning: 'UIUserNotificationTypeBadge' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications
Framework's UNAuthorizationOptions [-Wdeprecated-declarations]
@"badge" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeBadge],
^
In module 'UIKit' imported from /Users/zahidtekbas/Documents/GitHub/projectxyz-Flutter-App/projectxyz/ios/Pods/Target Support
Files/firebase_messaging/firebase_messaging-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Li
brary/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:17:32: note: 'UIUserNotificationType' has been
explicitly marked deprecated here
typedef NS_OPTIONS(NSUInteger, UIUserNotificationType) {
^
/Users/zahidtekbas/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.16/ios/Classes/FLTFirebaseMessagingPlugin
.m:295:70: warning: 'UIUserNotificationTypeAlert' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications
Framework's UNAuthorizationOptions [-Wdeprecated-declarations]
@"alert" : [NSNumber numberWithBool:notificationSettings.types & UIUserNotificationTypeAlert],
还有这些不推荐的方法,不推荐的UI元素,警告输出中的错误当我的目标是最低iOS 9.0时,这一次谷歌移动、FirebaseInstanceID、Flatter_inappwebview-4.0.0+4等给出了错误
因此,无论我的目标是什么平台,在构建iOS时都无法避免错误和警告。你知道如何解决由于不推荐的东西而产生的长段错误消息吗
编辑:我正在添加颤振博士-v的输出
[✓] Flutter (Channel beta, 1.26.0-17.8.pre, on macOS 11.2 20D64 darwin-x64, locale en-TR)
• Flutter version 1.26.0-17.8.pre at /Users/zahidtekbas/flutter
• Framework revision 044f2cf560 (3 days ago), 2021-02-24 13:02:05 -0800
• Engine revision 042c82b02c
• Dart version 2.12.0 (build 2.12.0-259.16.beta)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/zahidtekbas/Library/Android/sdk
• Platform android-30, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
• CocoaPods version 1.10.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.3.2)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 53.0.5
• Dart plugin version 203.6912
[✓] VS Code (version 1.53.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.4.1
[✓] Connected device (2 available)
• iPhone 12 Pro Max (mobile) • 943E0837-6EB7-45F6-B9F0-EC00160B2CDE • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.192
生成输出结束:
4 warnings generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team
ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
我也遇到了同样的问题,甚至我的minimumOSVersion设置为11.0,IPHONEOS_部署_目标设置为11.0,错误仍然显示,可能是Xcode出现了问题,顺便说一句,我使用Xcode 12.4和12.2仍然存在错误升级到新的颤振版本解决了我的问题。如果有人看到这一点,考虑升级你的依赖和颤动。你通过改变代码,而不是你的目标版本来修复贬低警告。或者你忽略它们(毕竟它们是警告),在下一次升级时处理技术债务。@tehhowch这不是忽略。我想这会阻止我在iOS上构建应用程序。有没有其他的可能?你认为这是因为Xcode中的新构建系统吗?