gpt4 book ai didi

ios - 无法使用firestore在IOS上运行flutter项目

转载 作者:行者123 更新时间:2023-11-29 05:22:35 25 4
gpt4 key购买 nike

我无法在 IOS 模拟器上运行 flutter 项目。我已将 Cloud Firestore for Firebase 与该项目集成。该项目在Android设备上完美运行,但无法在IOS模拟器上运行。

如果有人能帮我解决这个问题,我将不胜感激。

当我运行 pod install 命令时,出现以下错误,请检查。

Muhammads-MacBook-Pro:ios bhatti$ pod install Analyzing dependencies [!] CDN: trunk Repo update failed - 44 error(s): CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.2.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.2.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.3.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.3.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.4.2/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.4.3/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.4.4/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.5.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.6.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.7.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.8.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/3.9.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.0.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.0.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.0.2/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.0.3/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.0.4/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.0.5/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.0.9/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.1.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/4.2.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.0.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.0.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.1.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.1.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.1.2/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.1.4/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.2.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.3.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.4.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.5.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.6.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.7.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.8.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/5.8.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.0.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.0.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.0.2/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.0.3/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.0.4/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.1.0/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.1.1/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.1.2/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known) CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/e/2/1/FirebaseAnalytics/6.1.3/FirebaseAnalytics.podspec.json,
error: Failed to open TCP connection to raw.githubusercontent.com:443 (getaddrinfo: nodename nor servname provided, or not known)

错误

*** First throw call stack:
(
0 CoreFoundation 0x00007fff23baa1ee __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff50864b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23baa02c +[NSException raise:format:] + 188
3 Runner 0x0000000103e82d7a +[FIRApp configure] + 138
4 Runner 0x0000000104397086 -[FLTCloudFirestorePlugin init] + 214
5 Runner 0x0000000104396f11 +[FLTCloudFirestorePlugin registerWithRegistrar:] + 289
6 Runner 0x0000000103e7e5c0 +[GeneratedPluginRegistrant registerWithRegistry:] + 112
7 Runner <…>

Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:62281/vg54TtZ_CH0=/ws

应用程序委托(delegate)

#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

@end

最佳答案

原因可能有很多。请提供错误或错误消息的屏幕截图,以提供更多信息。

我最近添加了 cloud_firestore,花了几天时间才解决 ios 的依赖问题。

一些常见错误是:

  1. 版本兼容性 Firestore 至少需要 XCode 版本 10.1
  2. 未安装 Pod 文件。要解决此问题从终端转到 yourproject/ios目录并运行以下命令

pod install

  • 确保您执行了此操作 Step
  • 如果您可以提供更多信息或您执行的步骤,我可以进一步指导您。

    关于ios - 无法使用firestore在IOS上运行flutter项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58520306/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com