0

Is there anyone who successfully used either require.js or one of the commonJS implementations in apple tv apps? I wanted to give a try to require.js, but spotted right away that require.js uses window object and maybe some other stuff that simply doesn't exist on apple tv. So maybe I should look for other options? How do you guys deal with modules? My predecessor just concatenated bunch of .js files and made a mess with literally tens of thousands lines of code. Incredibly messy.

upd: Still trying to make require.js work but apple tv won't let me have data-main attribute in script tag, I guess you can run require.config in the next script that loads right after

upd2: Doesn't work... apple tv doesn't have window object... Darn you Apple... I'll try to make changes to require.js file itself

No... definitely require.js not suited, even after major refactoring and changing browser specific stuff in the lib to ATV specific, still doesn't work. :(

iLemming
  • 34,477
  • 60
  • 195
  • 309
  • possible duplicate of [Cordova 2.4.0 or 2.5.0 or 2.6.0 and requirejs](http://stackoverflow.com/questions/15440529/cordova-2-4-0-or-2-5-0-or-2-6-0-and-requirejs) – Paul Sweatte Apr 14 '14 at 22:28
  • What Cordova has to do with AppleTV? They are absolutely two different products. Implications of using javascript libraries on AppleTV specific to Apple TV and Apple TV only. I will explain that in more detailed post. – iLemming Apr 15 '14 at 14:41
  • There is an intersection via [Airplay](http://stackoverflow.com/questions/20346921/ios-airplay-plugin-using-cordova). – Paul Sweatte Apr 15 '14 at 17:09
  • Paul, AppleTV is not even based on iOS. it uses proprietary javascript engine and xml instead of DOM. So as I said they're not related – iLemming Apr 15 '14 at 18:47
  • [Airplay](https://developer.apple.com/airplay/) is an integration point between iOS and AppleTV which could be used as an alternative. – Paul Sweatte Apr 15 '14 at 20:12
  • There are [many](http://support.apple.com/kb/PH3245), [many](http://support.apple.com/kb/HT5404), [many](http://support.apple.com/kb/HT5517), [many](http://support.apple.com/kb/HT4448), [many](http://support.apple.com/kb/TS4215) mentions of the relationship. – Paul Sweatte Apr 15 '14 at 20:21
  • Well, what are you talking about? Airplay integration in an iOS app deployed through Cordova? Then yes, but this question is NOT related neither to airplay nor to iOS. It is about TV Apps on Apple TV – iLemming Apr 15 '14 at 20:58
  • >So maybe I should look for other options? – Paul Sweatte Apr 15 '14 at 21:04

0 Answers0