Firebase 无法使用Flatter和cloud\u firestore构建项目

Firebase 无法使用Flatter和cloud\u firestore构建项目,firebase,google-cloud-firestore,flutter,Firebase,Google Cloud Firestore,Flutter,我一直在试图弄清楚如何让cloud_firestore插件让Flatter工作,但到目前为止,还没有一个构建完成。我每次都会犯很多错误。。。我正在尝试为iOS iPhoneX模拟器进行构建 我遵循了这个代码实验室的说明: 我有和步骤9完全相同的代码 以下是错误: $ flutter run Launching lib/main.dart on iPhone X in debug mode... Running pod install...

我一直在试图弄清楚如何让cloud_firestore插件让Flatter工作,但到目前为止,还没有一个构建完成。我每次都会犯很多错误。。。我正在尝试为iOS iPhoneX模拟器进行构建

我遵循了这个代码实验室的说明: 我有和步骤9完全相同的代码

以下是错误:

$ flutter run
Launching lib/main.dart on iPhone X in debug mode...
Running pod install...                                      10,2s
Running Xcode clean...                                       1,5s
Starting Xcode build...                                          
Xcode build done.                                            2,6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    === BUILD TARGET gRPC-Core OF PROJECT Pods WITH CONFIGURATION Debug ===
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.3/ios/Classes/FirebaseCorePlugin.m:13:17: warning: property 'dictionary' requires method 'dictionary' to be defined - use @dynamic or provide a method implementation in this category [-Wobjc-property-implementation]
    @implementation FIROptions (FLTFirebaseCorePlugin)
                    ^
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.3/ios/Classes/FirebaseCorePlugin.m:10:46: note: property declared here
    @property(readonly, nonatomic) NSDictionary *dictionary;
                                                 ^
    1 warning generated.
    === BUILD TARGET cloud_firestore OF PROJECT Pods WITH CONFIGURATION Debug ===
    In file included from /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:5:
    In file included from /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.h:5:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/Flutter.h:37:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/FlutterAppDelegate.h:11:
    /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlugin.h:80:42: warning: 'UIUserNotificationSettings' is only available on iOS 8.0 or newer [-Wunguarded-availability]
        didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings;
                                             ^
    In module 'UIKit' imported from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Target Support Files/cloud_firestore/cloud_firestore-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:43:12: note: 'UIUserNotificationSettings' has been explicitly marked partial here
    @interface UIUserNotificationSettings : NSObject
               ^
    In file included from /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:5:
    In file included from /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.h:5:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/Flutter.h:37:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/FlutterAppDelegate.h:11:
    /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlugin.h:79:1: note: annotate 'application:didRegisterUserNotificationSettings:' with an availability attribute to silence this warning
    - (void)application:(UIApplication*)application
    ^
    /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlugin.h:95:44: warning: 'UIBackgroundFetchResult' is only available on iOS 7.0 or newer [-Wunguarded-availability]
              fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
                                               ^
    In module 'UIKit' imported from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Target Support Files/cloud_firestore/cloud_firestore-prefix.pch:2:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:76:29: note: 'UIBackgroundFetchResult' has been explicitly marked partial here
    typedef NS_ENUM(NSUInteger, UIBackgroundFetchResult) {
                                ^
    In file included from /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:5:
    In file included from /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.h:5:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/Flutter.h:37:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/FlutterAppDelegate.h:11:
    /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Public/Flutter/Flutter/FlutterPlugin.h:93:1: note: annotate 'application:didReceiveRemoteNotification:fetchCompletionHandler:' with an availability attribute to silence this warning
    - (BOOL)application:(UIApplication*)application
    ^
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:115:45: warning: implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
          @"oldIndex" : [NSNumber numberWithInt:documentChange.oldIndex],
                        ~                       ^~~~~~~~~~~~~~~~~~~~~~~
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:116:45: warning: implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
          @"newIndex" : [NSNumber numberWithInt:documentChange.newIndex],
                        ~                       ^~~~~~~~~~~~~~~~~~~~~~~
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:160:21: warning: implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'UInt32' (aka 'unsigned int') [-Wshorten-64-to-32]
        [self writeSize:blob.length];
        ~               ^~~~~~~~~~~
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:270:7: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
          transactions[transactionId] = transaction;
          ^
          self->
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:277:29: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
                                transactionResults[transactionId] = doTransactionResult;
                                ^
                                self->
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:284:14: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
          return transactionResults[transactionId];
                 ^
                 self->
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:298:37: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
          FIRTransaction *transaction = transactions[transactionId];
                                        ^
                                        self->
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:322:37: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
          FIRTransaction *transaction = transactions[transactionId];
                                        ^
                                        self->
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:331:37: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
          FIRTransaction *transaction = transactions[transactionId];
                                        ^
                                        self->
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:340:37: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior [-Wimplicit-retain-self]
          FIRTransaction *transaction = transactions[transactionId];
                                        ^
                                        self->
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:351:26: error: unknown receiver 'FIRSetOptions'; did you mean 'FIROptions'?
                    options:[FIRSetOptions merge]
                             ^~~~~~~~~~~~~
                             FIROptions
    In file included from /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:7:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Private/Firebase/Firebase.h:1:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Private/FirebaseCore/FirebaseCore.h:21:
    /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Private/FirebaseCore/FIROptions.h:25:12: note: 'FIROptions' declared here
    @interface FIROptions : NSObject <NSCopying>
               ^
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:351:40: error: no known class method for selector 'merge'
                    options:[FIRSetOptions merge]
                                           ^~~~~
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:350:17: error: no visible @interface for 'FIRDocumentReference' declares the selector 'setData:options:completion:'
          [document setData:call.arguments[@"data"]
           ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:440:76: error: unknown receiver 'FIRSetOptions'; did you mean 'FIROptions'?
          [batch setData:call.arguments[@"data"] forDocument:document options:[FIRSetOptions merge]];
                                                                               ^~~~~~~~~~~~~
                                                                               FIROptions
    In file included from /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:7:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Private/Firebase/Firebase.h:1:
    In file included from /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Private/FirebaseCore/FirebaseCore.h:21:
    /Users/arthurdepasse/Programmation/flutter_cloud_firestore/ios/Pods/Headers/Private/FirebaseCore/FIROptions.h:25:12: note: 'FIROptions' declared here
    @interface FIROptions : NSObject <NSCopying>
               ^
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:440:90: error: no known class method for selector 'merge'
          [batch setData:call.arguments[@"data"] forDocument:document options:[FIRSetOptions merge]];
                                                                                             ^~~~~
    /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:440:14: error: no visible @interface for 'FIRWriteBatch' declares the selector 'setData:forDocument:options:'
          [batch setData:call.arguments[@"data"] forDocument:document options:[FIRSetOptions merge]];
           ~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    12 warnings and 6 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone X.
$flatter运行
在调试模式下在iPhone X上启动lib/main.dart。。。
正在运行pod安装。。。10,2s
正在运行Xcode清理。。。1,5s
正在启动Xcode生成。。。
Xcode构建完成。2,6s
无法生成iOS应用程序
Xcode生成的错误输出:
↳
**构建失败**
Xcode的输出:
↳
===使用配置调试构建项目吊舱的目标gRPC核心===
/Users/arthurdepasse/SDKs/flatter_v0.3.1-beta/.pub cache/hosted/pub.dartlang.org/firebase_core-0.2.3/ios/Classes/FirebaseCorePlugin.m:13:17:警告:属性“dictionary”要求定义方法“dictionary”-使用@dynamic或在此类别中提供方法实现[-Wobjc属性实现]
@实施建议(FLTFirebaseCorePlugin)
^
/Users/arthurdepasse/SDKs/flatter_v0.3.1-beta/.pub cache/hosted/pub.dartlang.org/firebase_core-0.2.3/ios/Classes/FirebaseCorePlugin.m:10:46:注意:此处声明了属性
@属性(只读,非原子)NSDictionary*dictionary;
^
生成1个警告。
===使用配置调试构建项目吊舱的目标云存储===
文件包括在/Users/arthurdepasse/SDKs/flatter_v0.3.1-beta/.pub cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:5:
文件包括在/Users/arthurdepasse/SDKs/flatter_v0.3.1-beta/.pub cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.h:5:
文件包含在/Users/arthurdepasse/Programmation/flatter_cloud_firestore/ios/Pods/Headers/Public/flatter/flatter/flatter.h:37:
在/Users/arthurdepasse/Programmation/flatter_cloud_firestore/ios/Pods/Headers/Public/flatter/flatter/flatterappdelegate.h:11中包含的文件中:
/Users/arthurdepasse/Programmation/Flatter\u cloud\u firestore/ios/Pods/Headers/Public/Flatter/Flatter/FlatterPlugin.h:80:42:警告:“UIUserNotificationSettings”仅在ios 8.0或更高版本上可用[-Wunguarded availability]
didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings;
^
在从/Users/arthurdepasse/Programmation/flatter\u cloud\u firestore/ios/Pods/Target Support Files/cloud\u firestore/cloud\u firestore-prefix导入的模块“UIKit”中。pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIUserNotificationSettings.h:43:12:注意:“UIUserNotificationSettings”已在此处明确标记为部分
@接口UIUserNotificationSettings:NSObject
^
文件包括在/Users/arthurdepasse/SDKs/flatter_v0.3.1-beta/.pub cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:5:
文件包括在/Users/arthurdepasse/SDKs/flatter_v0.3.1-beta/.pub cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.h:5:
文件包含在/Users/arthurdepasse/Programmation/flatter_cloud_firestore/ios/Pods/Headers/Public/flatter/flatter/flatter.h:37:
在/Users/arthurdepasse/Programmation/flatter_cloud_firestore/ios/Pods/Headers/Public/flatter/flatter/flatterappdelegate.h:11中包含的文件中:
/Users/arthurdepasse/Programmation/Flatter_cloud_firestore/ios/Pods/Headers/Public/Flatter/Flatter/FlatterPlugin.h:79:1:注意:使用可用性属性注释“application:didRegisterUserNotificationSettings:”以消除此警告
-(无效)申请:(UIApplication*)申请
^
/Users/arthurdepasse/Programmation/Flatter\u cloud\u firestore/ios/Pods/Headers/Public/Flatter/Flatter/FlatterPlugin.h:95:44:警告:“UIBackgroundFetchResult”仅在ios 7.0或更高版本上可用[-Wunguarded availability]
fetchCompletionHandler:(void(^)(UIBackgroundFetchResult结果))completionHandler;
^
在从/Users/arthurdepasse/Programmation/flatter\u cloud\u firestore/ios/Pods/Target Support Files/cloud\u firestore/cloud\u firestore-prefix导入的模块“UIKit”中。pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:76:29:注意:“UIBackgroundFetchResult”已在此处明确标记为部分
typedef NS_枚举(NSUTEGER,UIBackgroundFetchResult){
^
文件包括在/Users/arthurdepasse/SDKs/flatter_v0.3.1-beta/.pub cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.m:5:
文件包括在/Users/arthurdepasse/SDKs/flatter_v0.3.1-beta/.pub cache/hosted/pub.dartlang.org/cloud_firestore-0.7.0+2/ios/Classes/CloudFirestorePlugin.h:5:
文件包含在/Users/arthurdepasse/Programmation/flatter_cloud_firestore/ios/Pods/Headers/Public/flatter/flatter/flatter.h:37:
在/Users/arthurdepasse/Programmation/flatter_cloud_firestore/ios/Pods/Headers/Public/flatter/flatter/flatterappdelegate.h:11中包含的文件中:
/Users/arthurdepasse/Programmation/Flatter\u cloud\u firestore/ios/Pods/Headers/Public/Flatter/Flatter/Flatterplugin.h:93:1:注意:使用可用性属性来关闭此警告,并注释“application:DidReceiveEmoteNotification:fetchCompletionHandler:”
-(BOOL)应用程序:(UIApplication*)a
$ flutter doctor -v
[✓] Flutter (Channel beta, v0.3.2, on Mac OS X 10.13.2 17C88, locale fr-FR)
    • Flutter version 0.3.2 at /Users/arthurdepasse/SDKs/flutter_v0.3.1-beta
    • Framework revision 44b7e7d3f4 (3 weeks ago), 2018-04-20 01:02:44 -0700
    • Engine revision 09d05a3891
    • Dart version 2.0.0-dev.48.0.flutter-fe606f890b

[!] Android toolchain - develop for Android devices
    • Android SDK at /Users/arthurdepasse/Library/Android/sdk
    • Android NDK at /Users/arthurdepasse/Library/Android/sdk/ndk-bundle
    ✗ Android SDK is missing command line tools; download from <link removed>
    • Try re-installing or updating your Android SDK,
      visit https://flutter.io/setup/#android-setup for detailed instructions.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.3, Build version 9E145
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.0

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] VS Code (version 1.23.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.12.1

[✓] Connected devices (1 available)
    • iPhone X • 1295166F-AF96-4DA3-9D82-4172A0F9C55A • ios • iOS 11.3 (simulator)

! Doctor found issues in 1 category.
dependencies:
  flutter:
    sdk: flutter
ons class for iOS style icons.
  cupertino_icons: ^0.1.2
  cloud_firestore: '^0.7.3'
  firebase_auth: '^0.5.11'