Playground in Swift won't use Firebase

China☆狼群 提交于 2019-12-06 06:27:22

问题


As u probably all might know Firebase made a Version jump and I am trying to get my setup working with the Xcode 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?

Software in use:

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

Any help or clues here for me?


回答1:


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

Once you build the framework then import:

import AppFramework
import FirebaseCore

Most things will work, except for Auth related functions.



来源:https://stackoverflow.com/questions/37361320/playground-in-swift-wont-use-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!