Using Firebase with tvOS

When I try to use the Firebase framework using tvOS (via cocoapods), I get the following error:

Target 'Pods-Portal TV' of project 'Pods' was rejected as an implicit dependency for 'Pods_Portal_TV.framework' because it doesn't contain platform 'appletvsimulator' in its SUPPORTED_PLATFORMS 'iphonesimulator, iphoneos'

I tricked 'cocoapods to install the framework because it did not recognize tvOS as a supported platform, declaring the target as :ios .

It’s so easy to understand what the problem is. My question is: is it possible to get around this while Firebase does not officially support tvOS?

+8
tvos swift firebase apple-tv
source share
3 answers

Ok, so I earned it, although a little broken.

This is a very quick guide on how at the time of writing.

First you need to configure CocoaPods to use unpublished functions and get the main branch cocoapods / cocoapods-core

Then you need to create a private rep positioning spec or use my

Remember to set the xcode path to your beta version of xcode sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer , otherwise the specification will not be created.

Then install your source in your spec file and install the platform in platform :tvos, '9.0' in your subfile, and then pod install .

Then your project should build and run, but with approximately 155 warnings:

 ld: warning: URGENT: building for tvOS simulator, but linking in object file (/Users/..../..../.... /tvOS/Pods/Firebase/Firebase.framework/Firebase(FPendingPut.o)) built for iOS. Note: This will be an error in the future. 

Obviously, this is not a hard decision. This is definitely not a production solution. But hopefully Firebase will add support in the future. I spoke with Frank from the Firebase team, who said that he will consider this in the next discussion of the function to see if they want to enable it. Here to hope they will be :)

Also, for some reason, did I have to subtract from the import statement Accounts/Accounts.h in FAuthData.h? I do not know if anyone can describe this.

+8
source share

EDIT (8/5/17): tvOS support is being added in the open source Firebase SDK in issue # 10 . Please follow him and do your part!

Firebase developer is here.

I created a beta version of the Firebase infrastructure for tvOS, and I am happy to share with people so that they can give feedback. Please email me at mcdonald firebase com for access.

EDIT (7/28/16): Given the date on this post and the huge release of Firebase on Google I / O 2016, there are a few additional caveats that I have to add to what this library does.

  • This is client version 2.x and will work with a database for all projects. However, authentication will not work with projects created after 05/18/2012.
  • This client is not compatible with Nest, as Nest only supports Firebase 1.x clients.

EDIT (8/27/16): Please fill out this form to tell us that you need Firebase support on other platforms (macOS, tvOS, watchOS).

+13
source share

Having received some progress from the open source community recently, I just got auth / database working after one or two hours, mostly fighting the podfile. It seems to work, check out https://github.com/firebase/firebase-ios-sdk#community-supported-efforts

+2
source share

All Articles