Serve and Package
Dev mode (serve)
app_tvos
The first time you will serve or package an apple profile, a new folder app_tvos
will be added in your root project folder. This subproject aims at running your app on Apple device with your own project configuration (name, logo, splash video, etc..).
Youβll be notified everytime an update is applied on the tvos_app_template
project, so you can apply them on your side as well.
Caution
To fetch the app template you need to have acces to AWS. So ensure :
- you are logged in to codeartifact,
- you set up environment variable (TVOS requirements | Setup your configuration of aws for tvos)
You absolutely need jq.
After your first grunt serve, ensure that app_tvos
folder is not just empy folders.
Solution 1 (on macOS):
Considering you have set up a correct apple profile, then run the following command:
grunt serve --profile=my-tvos-profile
Your app is now served on http://<your_ip>:9000 & simulator starts with app.
Solution 2 (only js):
Considering you have set up a correct apple profile, then run the following command :
grunt serve --profile=my-apple-profile --only-js
Your app is now served on http://<your_ip>:9000
.
This will work on all OS because it is only serving js and not building any TVOS application
Note
This method may work for non macOS device to serve, and use a VM to build the TVOS application. But this has not been tested and we do not guarantee that it will work.
To run on device or simulator, open app_tvos
project from XCode (require MacOS).
open app_tvos/WtvAppTemplate.xcworkspace
You must declare an Environment Variable with your IP MACHINE to serve App. To configure it go to Product > Scheme > Edit Scheme.
Finally, you can launch your application using the play icon on the top left of xcode.
Packaging (debug / release)
Debug
Considering you have set up a correct apple profile, then run the following command (not works on Linux / Windows):
grunt package --profile=my-apple-profile
Your app is now generated to dist/app_tvos-my-apple-profile/build/Build/Products/Debug-appletvos/tvOS-App.app.
Release
Considering you have set up a correct apple profile, then run the following command (not works on Linux / Windows):
grunt package --profile=my-apple-profile --release
Your app is now generated to dist/app_tvos-my-apple-profile/App.xcarchive .