Firebase模块安装在ios上 [英] Firebase Module install on ios

查看:109
本文介绍了Firebase模块安装在ios上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照所有说明在 ios 上集成了新的 firebase 版本:


  1. 我下载了文件 GoogleService-Info.plist 并将其包含在项目中。


  2. 我用cocoapods安装了框架



  3. $ b 问题是用这行代码:

      @import Firebase; 

    Xcode输出这个错误:


    Firebase未找到模块

    解决方案是什么?



    我的代码:

      #importAppDelegate.h

    @import Firebase

    @interface AppDelegate()

    @end

    @implementation AppDelegate
    $ b - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [FIRApp configure];

    //覆盖应用程序启动后自定义的点。
    返回YES;
    }

    解决方案


    #import< Firebase / Firebase.h>



    而不是



    @import Firebase


    I followed all instructions for integrating the new firebase release on ios:

    1. I downloaded the file GoogleService-Info.plist and include it in the project.

    2. I installed the framework with cocoapods

    The problem is with this line:

    @import Firebase;
    

    Xcode prints this error:

    "Module Firebase not found"

    What is the solution?

    My code :

    #import "AppDelegate.h"
    
    @import Firebase
    
    @interface AppDelegate ()
    
    @end
    
    @implementation AppDelegate
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        [FIRApp configure];
    
        // Override point for customization after application launch.
        return YES;
    }
    

    解决方案

    I ended up fixing it by using

    #import <Firebase/Firebase.h>

    instead of

    @import Firebase

    这篇关于Firebase模块安装在ios上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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