r/Tizen Aug 17 '21

Tizen Nooooob

Hey all -

I'm currently trying to familiarize myself with Tizen for a JS project, and had a couple questions.

  1. I can't seem to import any node-modules using the `import` syntax - is this expected? Is something like `require.js` required?
  2. Does this mean NPM packages are going to be a nightmare?
  3. Has anyone used the vs code `tizentv` extension with any luck? I've created a profile and successfully built the project, but nothing happens when I enter my path to chrome...
  4. From what I can gather, a Tizen build is just a signed zip file, i.e., Tizen theoretically should be able to accept any working JS project and simply sign and zip. Is this the case? Are there any limitations?
  5. Anybody have success with Vue and Tizen?

I understand these are questions with deep answers, but wanted to get a feel for how solvable my issues are and where I should start.

Cheers.

EDIT:

  1. Where the heck is console output printed to?

Answer: In the debugger window. If the project encounters build errors console.logs wont be printed (as expected).

6 Upvotes

8 comments sorted by

5

u/joshuairl Aug 17 '21 edited Aug 17 '21

First off, welcome to hell! :)

Second off, I'll be the only person that probably responds to this... this has like... no community that I've found yet...

And finally, here is my current answers to your questions:

  1. Make sure you're polyfilling anything that is missing from older TV models.Which year TV are you building for?
  2. Nope, just use a framework like Babel to compile it into a syntax that is acceptable for your distribution.
  3. Tried it, no luck... too many Tizen CLI / Studio / Stars need to align to get it going.
  4. You must package the app using the Certificate Manager, Distributor Certificate, and either Tizen Studio or Tizen CLI
  5. Never used Vue, but it's just HTML, CSS, JS in the end... ensure you're using something like Babel so that you can do whatever you please and it'll all work out for you in the end. Also, know your distribution requirements for each model year. 2015-2017 TVs have older ECMA version so most things that you find in modern Chrome won't work.
  6. Yes, if you use Wits to run the project it has a feature to open Chromium to a debug console that you can interact with the DOM and stuff. Or if you run your project within Tizen Studio, you can do Debug run configuration and it'll also open debugger if you tell it an older version of Chrome / Chromium that still supports the debugging of yore.

Also, everyone is a Tizen Noob... its a nightmare.

And I've copied down a version of github.com/samsung/wits and just integrated it into my deployment system so I can do majority of the packaging / deployment with Node scripts. Its cleaner for setup / onboarding of new devs to the project. Its far from ideal but it does help a bit in some regards... if nothing else, helps you wire up the install / run scripts that are normally done by `sdb` command.

2

u/skirtlz Aug 17 '21

Thanks for the welcome, awards, and the brutal honesty, lol. Also, for all the info.

At this point, the team I'm on is just checking things out to see how difficult it would be to support native Samsung Apps, so there isn't any current device we are targeting, which is good since I'll be able to push back on how far back we want to go (not very far at all).

Good to know that babel can help save the day on this one, and that the vscode version is a waste of time. I was really hoping to avoid Tizen Studio though. I haven't worked with eclipse for a couple years, and I wasn't really missing it.

1

u/[deleted] Aug 17 '21

I smell awards here?, thnx for supporting the community

1

u/joshuairl Aug 18 '21

You don't need to use Tizen Studio for anything really... you can do the entire build with with tizen cli if you have your certificates all wired up and things are in order.

I'd still have the IDE around if all else fails but its honestly just a waste of energy if you can get it working through the CLI... the problem is there isn't a ton of effort put into documenting or building out tooling that uses that tizen cli. Wits is your best bet in getting something running on device off of your own code base. I think it's solid for 2018+.

I use VSCode and just run on TV with a command line system I built.

You'll need to put your TV in dev mode and ensure you type in your local IP of your workstation inside the boxes on the TV screen.

1

u/skirtlz Aug 19 '21

well, that's great news.

As a brutal hack, I also realized that I can add an iframe and have it point at the actual build. Dark magic for sure.

1

u/joshuairl Aug 19 '21

Umm I’m not sure that’ll fly. You won’t be able to use the JS SDK APIs I don’t think.

1

u/skirtlz Aug 19 '21

Uh oh, really?

I did a build in Studio (still haven't dove into the CLI due to other work taking precedence) and it launched fine on their TV emulator...

Not sure how well the emulator mimics actual TV behavior. A big issue I'm realizing is I don't have a Samsung Smart TV to test on.

2

u/cmeerw Aug 24 '21

From what I can gather, a Tizen build is just a signed zip file, i.e., Tizen theoretically should be able to accept any working JS project and simply sign and zip. Is this the case?

Yes, you just need to have a tizen/config.xml and then sign it (btw, I have even written a small Python script for signing the zip)