Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tvOS #55

Merged
merged 2 commits into from
Nov 7, 2018
Merged

Add support for tvOS #55

merged 2 commits into from
Nov 7, 2018

Conversation

CarlEkman
Copy link
Contributor

@CarlEkman CarlEkman commented Nov 2, 2018

What?

I've been attempting to extend the single-target framework for tvOS-support, but there is something still not working (something missing in the Build Settings I assume). I'm looking for input, and to see if this build working frameworks on other machines.

Why?

We currently show in the README that we support tvOS, but that's not true. It should also be a quite straightforward extension, if this would work.

Discussion

Does anyone know what's preventing this from building correctly? The .framework file I get is empty when I import it into another project (i.e. no classes or APIs are exposed).

@@ -62,6 +62,21 @@ extension UIButton: SignalProvider {
}
}

extension UISegmentedControl: SignalProvider {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved this code around to make the preprocessor checks cleaner.

@CarlEkman CarlEkman changed the title Add support for tvOS [WIP] Add support for tvOS Nov 2, 2018
Copy link
Contributor

@mansbernhardt mansbernhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@CarlEkman
Copy link
Contributor Author

@fennecOS @mansbernhardt Any chance one of you could try to build the framework for tvOS on your machines? The tests pass, but the product itself seems empty when I try it out...

@CarlEkman
Copy link
Contributor Author

According to this reference, I should add arm64 to Valid Architectures, but that didn't change anything for me.

@mansbernhardt
Copy link
Contributor

Selecting the Apple tvOS simulator and running the test on that builds and runs the test. Looking into the FW bundle says "Flow" binary is 1.9MB.

Building for generic Apple tvOS device gives a binary of 1.8MB.

So it seems to work, no?

@CarlEkman
Copy link
Contributor Author

@mansbernhardt yes, it looks good :) But for some reason when I include that framework in a template tvOS project, I can't seem to use anything in the framework. I've tried including it the same way in both MacOS and iOS projects (which both work), but not on tvOS. Does anyone else experience the same thing?

@mansbernhardt
Copy link
Contributor

Do you have a sample project I can try out on the simulator?

@CarlEkman
Copy link
Contributor Author

@mansbernhardt I was about to link you a new repo with just a single-view template tvOS app inside, but I think I found what's wrong. The contents of the framework is being built for arm64, which is correct for physical AppleTVs, but the simulator runs on x86_64, so it ignores all those sources when running the simulator.

I'm now trying different configurations of Build Active Architectures Only together with Architectures and Valid Architectures in Flow...

@CarlEkman
Copy link
Contributor Author

Hey, what do you know! Turns out everything works fine when using Carthage 😄 It was just me being curious as to why the .framework didn't work when I built it locally. Guess it isn't that simple. Never mind my talk about architectures, it looks like this works fine now.

@CarlEkman CarlEkman changed the title [WIP] Add support for tvOS Add support for tvOS Nov 7, 2018
@CarlEkman CarlEkman merged commit e06aca1 into master Nov 7, 2018
@CarlEkman CarlEkman deleted the tvos-support branch November 7, 2018 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants