Swift中的游乐场不会使用Firebase [英] Playground in Swift won't use Firebase

查看:99
本文介绍了Swift中的游乐场不会使用Firebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可能所有人都知道 Firebase 进行了版本跳转,我正在尝试使设置与Xcode Playground。

As u probably all might know Firebase made a Version jump and I am trying to get my setup working with the Xcode Playground.

有参考资料介绍如何使用旧版本的Cocoapods和Ruby在Playground中实现Firebase,但对我来说真的不起作用用于试验Firebase的快速游乐场。即使项目本身的Firebase实施工作正常,并且我可以导入Firebase,也无法再在Playground上使用它。

There is a reference how to implement Firebase in Playground with older versions of Cocoapods and Ruby but that won't really work for me swift playground for experimenting with firebase. Even though Firebase implementation in the Project itself works fine and i can import my Firebase it won't work on a Playground any more.

有人知道如何添加工作对象吗?

Does somebody know how to add a working setup with a Playground and Firebase?

正在使用的软件:


  • 可可足类: 2.6.4

  • 吊舱:1.0

  • Xcode:7.3.1

  • Firebase:3.2.0

  • Cocoapods: 2.6.4
  • Pod: 1.0
  • Xcode: 7.3.1
  • Firebase: 3.2.0

这里有对我有用的帮助吗?

Any help or clues here for me?

推荐答案

我创建了一个Framework,然后导入了我的Playground。确保您在Podfile中正确定位了框架:

I created a Framework and then imported into my Playground. Make sure you properly target the framework in the Podfile:

target 'YourApp' do
    pod 'Firebase/Core'
    target 'YourAppFramework' do
    end
end

构建框架,然后导入:

import AppFramework
import FirebaseCore

除Auth相关功能外,大多数功能都可以使用。

Most things will work, except for Auth related functions.

这篇关于Swift中的游乐场不会使用Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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