使用cloud_firestore在IOS Simulator上出错

问题描述 投票:1回答:1

这是我第一次尝试将Firebase cloud_firestore与Flutter一起使用。它适用于Android模拟器。但是当我尝试在IOS Sim上运行时,我收到以下错误:

/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:50:22: error: no visible @interface for 'FIRQuery' declares the selector 'queryWhereField:arrayContains:'
query = [query queryWhereField:fieldName arrayContains:value];
~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:221:29: error: no known class method for selector 'fieldValueForArrayUnion:'
return [FIRFieldValue fieldValueForArrayUnion:[self readValue]];
^~~~~~~~~~~~~~~~~~~~~~~
/Users/carsoncarbery/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/ios/Classes/CloudFirestorePlugin.m:224:29: error: no known class method for selector 'fieldValueForArrayRemove:'
return [FIRFieldValue fieldValueForArrayRemove:[self readValue]];
^~~~~~~~~~~~~~~~~~~~~~~~
8 warnings and 3 errors generated.
Could not build the application for the simulator.
Error launching application on iPhone 6s.

我也尝试直接从Xcode运行Runner并获得相同的三个构建错误。不幸的是我无法找到答案,所以我发布了这个问题。我们将非常感激地提供任何帮助。谢谢

flutter google-cloud-firestore flutter-dependencies
1个回答
0
投票

我刚刚经历过同样的事情。继这些家伙https://github.com/flutter/flutter/issues/24395

我做到了

pod update Firebase/Firestore

它对我有用。我正在使用最新版本的cloud firestore:0.9.0 + 1我可以从Xcode和VS Code编译。在模拟器上运行时会有很多警告消息。其中一些看起来很讨厌,但它确实有效。

© www.soinside.com 2019 - 2024. All rights reserved.