Building for the new AppleTV / tvOS

I run this cocos2dx-helloword on tvos successful,but I find all of the label use the system font is black,setTextColor or setColor is useless,If evenryone know whatā€™s wrong is it?@netunlimited, @elvman

@digitalhoax If by gamepad you mean using ā€œController::startDiscoveryController()ā€ and so on, then yes, it works. I use this to check if the ā€œmainā€ button or play/pause button is pressed (== menu button selected).

I donā€™t need to access the canExitApp variable from cocos2d-x, I use NDKHelper to call from c++ a method in AppController to change canExitApp.

@kavenGw Are you using a TTF font file for your labels? If so, check if itā€™s included in the Xcode tv target.

congrats to 3.10 :wink: Do you think that the tvos support will go to 3.11?

1 Like

yes.

@ShunLin any objection in adding TVos support for v3.11?

Will this include also JS support thus compiling SpiderMonkey with bitcode support?
More at: Help with compiling SpiderMonkey for tvOS
Thanks :wink:

if we add support of tvos, it will include all the needed libraries compiled with bitcode support.

1 Like

Hi guys, I still experience an issue when trying to build on my apple tv. During link phase I get ā€œbuilding for tvOS, but linking in object file built for iOS, for architecture arm64ā€
Does somebody has any idea?

Did not find an issue to add this: When someone adds support for the Apple TV remote will he please add support for controller.motion.userAcceleration and controller.motion.gravity? Thanks!

Our app has finally been approved for tvOS, only three month short of the initial schedule:

https://itunes.apple.com/us/app/comet-tail/id1068440823?ls=1&mt=8

We used @elvman 's fork, thanks a lot!

1 Like

Sorry to hijack this thread, but it turned up when googling for cocos2d-x and prebuilt libs and bitcode. I normally use my prebuilt cocos2d-x libs when developing games. Now I figure I should start using bitcode libs. Will I run into any problems?

Hi @umai, sorry for being a bit late to reply. I am using precompiled bitcode enabled libs for the tvOS/iOS app mentioned above and it works flawlessly. @elvman provided the precompiled libs that get included when building the cocos2d-x libs. Just check out his post to this thread earlier.

Do you still plan on adding tvos support in v3.11?
I can imagine that you were busy with releasing Cocos creator and also with GDCā€¦

@ShunLin any update on this?

Hey,

Will it be available this week by any chanceā€¦ I really want to submit my game for the applovin competition.

https://blog.applovin.com/two-weeks-until-the-deadline-for-the-tvos-contest/

Deadline is 31st March. :frowning:

Thanks

Just use what is available @b12345, it works great. Especially for the competition, where you will only submit a TestFlight build and not release to thousands of users.

Is the TVOS Kit freely available? How is it possible to get it?

You can get it is you sign up to be an Apple Developer. developer.apple.com

The tvOS 9.3 update removed notifications related to the on-screen keyboard.
see the changes here:
https://developer.apple.com/library/tvos/releasenotes/General/tvOS92APIDiffs/Objective-C/UIKit.html
Has anybody got a workaround yet?

@elvman Everything works great on apple tv simulatorā€¦ but i get the following error when testing it on a ATV device

(ftbase.ios8_arm64.o), building for tvOS, but linking in object file built for iOS, for architecture arm64

Iā€™ve tried replacing the prebuilt libraries but nothing seems to work. What am I doing wrong?