# Beginning tvOS Development with TVML Tutorial

**URL:** <https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189>\
**Category:** 🎓 Courses & Articles\
**Created:** [March 7, 2016, 4:36am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189 "2016-03-07T04:36:51Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelvin\_lau](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kelvin_lau/32/109371_2.png) [@kelvin\_lau](https://forums.kodeco.com/u/kelvin_lau)\
**Post date:** [March 7, 2016, 4:36am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/1 "2016-03-07T04:36:52Z")

</div>

Learn how to create your first tvOS app for the Apple TV in this TVML tutorial for complete beginners!

* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/1579-beginning-tvos-development-with-tvml-tutorial](https://www.raywenderlich.com/1579-beginning-tvos-development-with-tvml-tutorial)

---

<div class="post-metadata">

**Author:** ![kelvin\_lau](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kelvin_lau/32/109371_2.png) [@kelvin\_lau](https://forums.kodeco.com/u/kelvin_lau)\
**Post date:** [March 24, 2016, 6:05pm UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/3 "2016-03-24T18:05:27Z")

</div>

I don’t think anyone will stop you from doing it, as long as you’re not copying and pasting our materials 🙂

I’m glad this tutorial helped. Always happy to hear what readers think!

Cheers,  
Kelvin

---

<div class="post-metadata">

**Author:** ![khanh\_pham](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/khanh_pham/32/103433_2.png) [@khanh\_pham](https://forums.kodeco.com/u/khanh_pham)\
**Post date:** [April 1, 2016, 1:49am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/4 "2016-04-01T01:49:04Z")

</div>

Can we play an m3u8 file on TVOS ?  
I try to play an m3u8 file in a native tvos app but it’s not working. I have try to enable https and allow arbitrary loads but nothing work

Anyone can explain it why ??

---

<div class="post-metadata">

**Author:** ![wilburckwong](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/wilburckwong/32/38430_2.png) [@wilburckwong](https://forums.kodeco.com/u/wilburckwong)\
**Post date:** [August 7, 2016, 8:26am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/5 "2016-08-07T08:26:57Z")

</div>

AppleTV has a strict spec for HLS, see [Apple Developer Documentation](https://developer.apple.com/library/tvos/documentation/General/Reference/HLSAuthoringSpec/Requirements.html#//apple_ref/doc/uid/TP40016596-CH2-SW1).

---

<div class="post-metadata">

**Author:** ![wilburckwong](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/wilburckwong/32/38430_2.png) [@wilburckwong](https://forums.kodeco.com/u/wilburckwong)\
**Post date:** [August 7, 2016, 8:42am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/6 "2016-08-07T08:42:59Z")

</div>

Thanks Kelvin. Your tutorial was a good starting point in our project. May we know how can we get the AppleTV setting on “Subtitle Language” under the “Audio and Video” setting page, Swift/Object-C code is fine?

 ![](https://raywenderlich-com-v3-forums.s3.amazonaws.com/original/3X/f/7/f7f6351dcf039428c9a493fd5a73c7a7a3cc45a9.png)

---

<div class="post-metadata">

**Author:** ![gopinath](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gopinath/32/39134_2.png) [@gopinath](https://forums.kodeco.com/u/gopinath)\
**Post date:** [August 18, 2016, 9:37am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/7 "2016-08-18T09:37:46Z")

</div>

Can we use either swift or Objective C while using TVML/TVJS?

---

<div class="post-metadata">

**Author:** ![kelvin\_lau](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kelvin_lau/32/109371_2.png) [@kelvin\_lau](https://forums.kodeco.com/u/kelvin_lau)\
**Post date:** [August 18, 2016, 10:00am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/8 "2016-08-18T10:00:09Z")

</div>

Yup, both languages work.

---

<div class="post-metadata">

**Author:** ![gopinath](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gopinath/32/39134_2.png) [@gopinath](https://forums.kodeco.com/u/gopinath)\
**Post date:** [August 18, 2016, 2:15pm UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/9 "2016-08-18T14:15:22Z")

</div>

Hi,

I am looking for some **tvOS** SDKs or API’s used for payments like **Braintree** and **Stripe** which are being used on **iOS**. As there is no Apple pay feature on Apple TV/ tvOS, how can payments be processed?

Thanks,

---

<div class="post-metadata">

**Author:** ![siddharthan64](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/siddharthan64/32/81494_2.png) [@siddharthan64](https://forums.kodeco.com/u/siddharthan64)\
**Post date:** [August 26, 2016, 10:56am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/10 "2016-08-26T10:56:59Z")

</div>

What would be the best approach if I need to make REST API calls to retrieve the content to display? Can I still use TVML type of apps to make REST API calls to retrieve data?

---

<div class="post-metadata">

**Author:** ![nmatiyali1](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/nmatiyali1/32/42540_2.png) [@nmatiyali1](https://forums.kodeco.com/u/nmatiyali1)\
**Post date:** [September 26, 2016, 6:34am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/11 "2016-09-26T06:34:44Z")

</div>

Hi kelvin,

I am beginner to tvOS and following your tutorials on TVOS, all are very helpful.  
I am getting following error while running the hello world program which you explained in above article:  
ITML : SyntaxError: Unexpected token ‘\<’…{  
line = 1;  
sourceURL = “[http://localhost:9001/js/application.js](http://localhost:9001/js/application.js)”;  
}

I found following link over the web but this article did not help:  
.[tvos - tvml syntax error : Unexpected token '\<' - Stack Overflow](http://stackoverflow.com/questions/39188648/tvml-syntax-error-unexpected-token)  
Please provide me any solution for this issue

Thanks,

---

<div class="post-metadata">

**Author:** ![sviens](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sviens/32/87361_2.png) [@sviens](https://forums.kodeco.com/u/sviens)\
**Post date:** [October 2, 2016, 3:45pm UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/12 "2016-10-02T15:45:18Z")

</div>

Hi Kelvin, thanks for creating this tutorial. I’m a complete beginner to Xcode, Swift and tvOS development and your tutorial was helpful to get off the ground. I’m using XCode 8 and the latest Swift version and noticed that the API has changed a bit since the tutorial was published. Specifically the line where you grab the bounds of the main screen in the didFinishLaunchingWithOptions function have changed:

What was:

window = UIWindow(frame: UIScreen.mainScreen().bounds)

Is now:

window = UIWindow(frame: UIScreen.main.bounds)

Small thing I know and code-complete (or whatever it’s called in Xcode) helped a lot but took a novice like me some time to confirm my change was correct.

Steve

---

<div class="post-metadata">

**Author:** ![kelvin\_lau](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kelvin_lau/32/109371_2.png) [@kelvin\_lau](https://forums.kodeco.com/u/kelvin_lau)\
**Post date:** [October 2, 2016, 10:57pm UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/13 "2016-10-02T22:57:04Z")

</div>

Hey Steve!

Thanks for pointing that out. I’ve made the following changes:

- Updated the final `RWDevCon` project to Swift 3
- Updated the `application(didFinishLaunchingWithOptions:)` text to match the changes

Sorry for the trouble, I totally understand the frustration of finding out how to migrate old code to new code.

Kelvin

---

<div class="post-metadata">

**Author:** ![kelvin\_lau](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kelvin_lau/32/109371_2.png) [@kelvin\_lau](https://forums.kodeco.com/u/kelvin_lau)\
**Post date:** [October 2, 2016, 11:01pm UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/14 "2016-10-02T23:01:41Z")

</div>

Hey nmatiyali1!

JavaScript is not our friend ☹

My advice is to make sure you’ve got the " ` " character at the right place. When I was writing this, missing that was a frequent cause of errors. Otherwise, it’s likely you’ve just missed an angle bracket when declaring your elements in `createAlert` of `application.js`.

---

<div class="post-metadata">

**Author:** ![deepp](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/deepp/32/46808_2.png) [@deepp](https://forums.kodeco.com/u/deepp)\
**Post date:** [November 8, 2016, 5:50am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/16 "2016-11-08T05:50:54Z")

</div>

Hi Kelvin,

Thanks for sharing tutorial. Its explained in full detail ,was able to understand all itsy-bitsy of apple Tv development. However as I am referring other tutorials too, they are suggesting tvml and tvjs for development. And I am an ios developer ,will be developing apple TV app for first time, so can you please guide me about choice of language for TV development? Can I use swift,Obj-C and TVJS all together? or what would you recommend if my app uses servers and custom databases , should I be opting for TVML and TVJS or develping with swift is fine? As my app has third party library references too which are written in swift and payment gateway integration. Please do guide me with your expertise.

---

<div class="post-metadata">

**Author:** ![huygir](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@huygir](https://forums.kodeco.com/u/huygir)\
**Post date:** [December 30, 2017, 11:09pm UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/17 "2017-12-30T23:09:02Z")

</div>

Still a great tvOS starter. For anyone finding it 2 years later… here is the updated URL for the videos (fix in your template file): [https://wolverine.raywenderlich.com/rwdevcon.com/2015/videos/](https://wolverine.raywenderlich.com/rwdevcon.com/2015/videos/)\<mp4 file name here.

---

<div class="post-metadata">

**Author:** ![bgsuresh123](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@bgsuresh123](https://forums.kodeco.com/u/bgsuresh123)\
**Post date:** [February 18, 2018, 5:20am UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/18 "2018-02-18T05:20:27Z")

</div>

Does TVML support Fairplay DRM properly? We are unable to play DRM protected files due issues in loadAssetID? Has any one tested TVML Fairplay?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [February 18, 2018, 12:32pm UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/19 "2018-02-18T12:32:55Z")

</div>

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [February 18, 2018, 12:32pm UTC](https://forums.kodeco.com/t/beginning-tvos-development-with-tvml-tutorial/8189/20 "2018-02-18T12:32:59Z")

</div>


