0

我在android中做了一个应用程序,现在尝试在ios中运行它。我收到以下错误

    Xcode build done.                                           35.2s
    Configuring the default Firebase app...
    Configured the default Firebase app __FIRAPP_DEFAULT.
    6.34.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
    6.34.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60900000 started
    6.34.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see ....)
    Waiting for iPhone 11 to report its views...                         4ms
    6.34.0 - [Firebase/Analytics][I-ACS025036] App Delegate Proxy is disabled
    Lost connection to device.                                              
    Syncing files to device iPhone 11...                                    
    (This is taking an unexpectedly long time.)   

我有其他运行完美的 ios 应用程序。

运行flutter doctor显示这个

    flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B50 darwin-x64, locale
        en-GB)
    
    [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        ! Some Android licenses not accepted.  To resolve this, run: flutter doctor
        --android-licenses
    [✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    [!] Android Studio (version 3.1)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] Connected device (1 available)

    ! Doctor found issues in 2 categories.

编辑 = 移除火力基地

我删除了firebase的东西并收到了这样的简单消息

     Running pod install...                                              3.0s
    Running Xcode build...                                                  
    └─Compiling, linking and signing...                         9.1s
    Xcode build done.                                           35.8s
    Waiting for iPhone 11 to report its views...                         3ms
    Lost connection to device.                                              
    Syncing files to device iPhone 11...                                    
    (This is taking an unexpectedly long time.)       ⣻

知道有什么问题吗?

谢谢你。

4

3 回答 3

0

您可能正在按照 FlutterFire 文档中的说明创建辅助应用程序。https://firebase.flutter.dev/docs/core/usage/

辅助应用程序刚刚在我的 Android 环境中工作。我找到了一种解决方法,可以从以前创建的选项中加载选项。以这种方式,它在IOS中工作。

像这样的东西:

// Uses the default GoogleService-Info.plist
final Future<FirebaseApp> _firebaseDefaultApp = Firebase.initializeApp();

List<FirebaseApp> apps = Firebase.apps;
_firebaseSecondaryApp = Firebase.initializeApp(name: "SecondaryApp", options: apps[0].options);
于 2021-10-11T11:18:58.467 回答
0

I know I'm already late here, but this could be caused by improper configuration from Google Map or other API keys from within iOS. Try running the app in Xcode and you will get a more helpful error message.

In my case, it was a Google Map API key missing.

Solution:

Open AppDelegate.swift Add import GoogleMaps along with the other imports Add the following statement above GeneratedPluginRegistrant.register(with: self): GMSServices.provideAPIKey("YOUR_API_KEY_HERE") where YOUR_API_KEY would be something like AIzaSyBHV....wZEIg from the Cloud Console.

于 2021-08-02T00:33:00.350 回答
0

您正在使用 Firebase,您可能忘记将 firebase 的GoogleService-Info.plist文件从 xcode 添加到您的 IOS 项目。

此外,有时您需要pod install在 IOS 项目中运行以安装所需的 pod。

于 2021-01-13T13:07:35.077 回答