# Fetching text from TVML template

**URL:** <https://forums.solar2d.com/t/fetching-text-from-tvml-template/340831>\
**Category:** Apple TV and tvOS\
**Created:** [August 25, 2016, 10:21am UTC](https://forums.solar2d.com/t/fetching-text-from-tvml-template/340831 "2016-08-25T10:21:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vegard.nyeng](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/v/ce7236/32.png) [@vegard.nyeng](https://forums.solar2d.com/u/vegard.nyeng)\
**Post date:** [August 25, 2016, 10:21am UTC](https://forums.solar2d.com/t/fetching-text-from-tvml-template/340831/1 "2016-08-25T10:21:41Z")

</div>

Hi people, I’m trying to figure out how to test a TV OS app. The app is based on both swift code and templates generated by javascript.&nbsp;

This is the code that generates the text on the view I’m trying to fetch:

```
 \<text style="tv-text-style: none; color: rgb(0, 185, 242); font-size: 120px; font-weight: bold;"\>\<![CDATA[' + data.code + ']]\>\</text\>\n 

```

Using Safari’s debug tool options and printing out:print (app.debugDescription), it gives me this;  
"&nbsp;Other 0x7fb22ba4b360: traits: 8590000128, {{778.0, 372.0}, {363.0, 144.0}}, label: ‘gpupq’"

The “label: qpupq” is the text I’m trying to fetch, and the label will always be a 5 character string with no numbers, so it will be random.&nbsp;  
&nbsp;

Is there any way I can fetch that text using UI testing in XCode?

- Vegard

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [August 25, 2016, 1:24pm UTC](https://forums.solar2d.com/t/fetching-text-from-tvml-template/340831/2 "2016-08-25T13:24:57Z")

</div>

Hello Vegard. Welcome to the Corona Labs forums. Our forums are for discussing our products: Corona SDK, Corona Enterprise and CoronaCards, which are all frameworks for development that let you build cross-platform apps. In other words, you could, using Corona SDK build an Apple TV app and reuse most all of your code (95%+ in most cases) to build Amazon TV and Android TV apps from a single code base.

While someone in our community might know how to use Swift + JS for Apple TV, this really isn’t the right forum for this discussion. You will be better in the Apple Developer Forums or elsewhere.

I do invite you to go to [https://coronalabs.com](https://coronalabs.com) and download our free developer tools and explore cross platform development, though I’m not sure how beneficial we will be if you’re doing a lot of TVML.

Rob

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [August 25, 2016, 1:24pm UTC](https://forums.solar2d.com/t/fetching-text-from-tvml-template/340831/3 "2016-08-25T13:24:57Z")

</div>

Hello Vegard. Welcome to the Corona Labs forums. Our forums are for discussing our products: Corona SDK, Corona Enterprise and CoronaCards, which are all frameworks for development that let you build cross-platform apps. In other words, you could, using Corona SDK build an Apple TV app and reuse most all of your code (95%+ in most cases) to build Amazon TV and Android TV apps from a single code base.

While someone in our community might know how to use Swift + JS for Apple TV, this really isn’t the right forum for this discussion. You will be better in the Apple Developer Forums or elsewhere.

I do invite you to go to [https://coronalabs.com](https://coronalabs.com) and download our free developer tools and explore cross platform development, though I’m not sure how beneficial we will be if you’re doing a lot of TVML.

Rob
