Using Firebase with tvOS
Asked Answered
U

3

10

When I try to use the Firebase framework with 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 due to it not recognizing tvOS as a supported platform, by declaring the target as :ios.

So it's easy to see what the problem is. My question: Is it possible to work around this until Firebase officially supports tvOS?

Unific answered 25/9, 2015 at 15:8 Comment(8)
Hmm… you could try forking the podspec and adding a tvos platform.Wince
How do I specify the new podspec as the spec to use then? @AaronBragerUnific
See guides.cocoapods.org/making/private-cocoapods.htmlWince
I'm having the same problem with Quick/Nimble. adding tvos didn't work, will try adding appletv and appletvsimulator...Surly
@JonWillis how did you get on?Unific
@Unific well adding a bunch of deployment_targets didn't work: github.com/Pluto-tv/Quick/blob/…Surly
@Unific i got things to work once I fixed my podfile. I had forgotten to add the tvOS platform to my tests target: target 'tvosTests' do platform :tvos, '9.0' testing_pods endSurly
I'm struggleing adding my own podspec, the process doesn't seem straight forward. @JonWillis any tips?Unific
U
9

Ok, so I got it working, albeit, a bit flaky.

This is a very quick guide as to how, at the time of writing.

First you need to setup CocoaPods to use unreleased features and get the master branch of cocoapods / cocoapods-core

Then you need to create a private spec repo or use mine

Remember to set your xcode path to your beta version of xcode sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer otherwise the spec won't build.

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

Your Project should then build and run, but with about 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.

So obviously not a solid solution. Definately not a production solution. But hopefully Firebase will add support in the future. I spoke to Frank from the Firebase team who said that he will take it up at the next feature discussion to see if they want to include it. Here's to hoping they will :)

Also, I had to Comment out the Accounts/Accounts.h import statement in the FAuthData.h for some reason? I don't know if anyone can elaborate on that

Unific answered 29/9, 2015 at 9:31 Comment(5)
The Accounts framework is not apart of tvOS. A Firebase build for tvOS will have to (pun intended) account for that in the build.Collimator
Yeah, figured that that must've been the reason. Thanks for clarifying @DavidEastUnific
I am getting the following warning message in my project. building for tvOS simulator, but linking in object file (/Users/../../..//)) built for iOS. Note: This will be an error in the future.Siderolite
Does anyone found the solutions to resolve these warning messages.Siderolite
any update on this issue... any progress on the tvOS / firebase solutions?Rebba
T
15

EDIT (8/5/17): tvOS support is being added to the open source Firebase SDK in issue #10. Please follow along there and contribute!

Firebase developer here.

I've built a beta version of the Firebase framework for tvOS, and I'm happy to share with folks so 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 Firebase release at Google I/O 2016, there are a few extra caveats I should add to what this library does.

  • This is a version of the 2.x client and will work with the database on all projects. Authentication however, will not work with projects created after 5/18/2016.
  • This client is not compatible with Nest, as Nest only supports the 1.x Firebase clients.

EDIT (8/27/16): Please fill out this form to let us know you'd like support for Firebase on other platforms (macOS, tvOS, watchOS).

EDIT (10/29/21): Firebase 8.9.0 introduces official beta support for macOS, tvOS, and Catalyst. watchOS continues to be community supported.

Tanh answered 14/10, 2015 at 23:43 Comment(9)
Awesome Mike :) I pinged you an email.Unific
that is care for the customer :-)Pupil
Is this out of beta yet? Anyway to access without contacting you directly?Consummate
Nope, for now it's just a framework that I email you. We're still working on an overall tvOS strategy, so stay tuned for more--we'll definitely update the community.Tanh
@Unific the trick that I did? No. The trick below--doubtful, given the additional features added (analytics, etc.).Tanh
Thanks for the response Mike. Is there any way I can make my interest in a tvOS SDK officially known?Unific
Sure--I created a form (docs.google.com/a/google.com/forms/d/e/…) that you can use.Tanh
I want to integrate firebase analytics in my appletv app but it is still not for tvos.. other features are there like messaging etc.. any help if by any how I can use firebase analytics for tvosVascular
4 years later and still no support. We can probably forget about Firebase for tvOS..Textualism
U
9

Ok, so I got it working, albeit, a bit flaky.

This is a very quick guide as to how, at the time of writing.

First you need to setup CocoaPods to use unreleased features and get the master branch of cocoapods / cocoapods-core

Then you need to create a private spec repo or use mine

Remember to set your xcode path to your beta version of xcode sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer otherwise the spec won't build.

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

Your Project should then build and run, but with about 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.

So obviously not a solid solution. Definately not a production solution. But hopefully Firebase will add support in the future. I spoke to Frank from the Firebase team who said that he will take it up at the next feature discussion to see if they want to include it. Here's to hoping they will :)

Also, I had to Comment out the Accounts/Accounts.h import statement in the FAuthData.h for some reason? I don't know if anyone can elaborate on that

Unific answered 29/9, 2015 at 9:31 Comment(5)
The Accounts framework is not apart of tvOS. A Firebase build for tvOS will have to (pun intended) account for that in the build.Collimator
Yeah, figured that that must've been the reason. Thanks for clarifying @DavidEastUnific
I am getting the following warning message in my project. building for tvOS simulator, but linking in object file (/Users/../../..//)) built for iOS. Note: This will be an error in the future.Siderolite
Does anyone found the solutions to resolve these warning messages.Siderolite
any update on this issue... any progress on the tvOS / firebase solutions?Rebba
T
3

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

Tsarevitch answered 15/1, 2018 at 9:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.