如何使用SwiftUI解决Xcode Firebase集成问题:格式: [英] How would you fix Xcode Firebase Integration With SwiftUI saying: format:@"`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find "

查看:45
本文介绍了如何使用SwiftUI解决Xcode Firebase集成问题:格式:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于解决此问题我一无所知.

I am clueless as to what I need to fix this problem.

我在Xcode的工作区中运行了Firebase,并且遵循Firebase的说明:

I have Firebase running in my workspace in Xcode and I followed the Firebase instructions which are:

import UIKit
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
  [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
return true
   }
}

但是问题是当我运行项目时,仿真是白色的.然后转到FirApp.m并说以下代码.

But the issue is when I run the project the simulation is white. And goes to FirApp.m and says the following code.

    if (!options) {
[NSException raise:kFirebaseCoreErrorDomain
            format:@"`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find "
                   @"a valid GoogleService-Info.plist in your project. Please download one "
                   @"from %@.",
                   kPlistURL];

在本教程中,我一直在关注CodingWithChris-> https://youtu.be/1HN7usMROt8?t=2363

I was following CodingWithChris with this tutorial --> https://youtu.be/1HN7usMROt8?t=2363

推荐答案

当您再次下载GoogleService-Info.plist(5)时,必须确保它看起来不像GoogleService-Info.plist(5).不起作用.

You must make sure the GoogleService-Info.plist does not have a look like this GoogleService-Info.plist(5) when you download it again or it will not work.

要处理黑屏,错误如下:

To deal with black screen the error was the following:

Failed to instantiate the default view controller for UIMainStoryboardFile 'MainStoryboard' - perhaps the designated entry point is not set?

在情节提要中,请确保取消选中是初始View Controller"因为它可能会与多个视图控制器混淆.在应用程序中,转到应用程序目标,然后按信息"选项卡.减去或增加"Main storyboard file base name"的值.您需要使用减号使其消失.然后在常规"标签上清楚地对主界面"执行相同的操作.

In the storyboard, make sure to uncheck the "Is initial View Controller" because it might be getting confused with multiple view controllers. In the app go to app target and press the Info tab. There is minus or add in the value of "Main storyboard file base name" you need to use the minus to make it go away. Then on the "General tab" clear do the same thing for "Main Interface".

这篇关于如何使用SwiftUI解决Xcode Firebase集成问题:格式:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆