If I make a change in a document (say a user watched a video and I update the "views" counter), I'd like to update the TVML element showing the counter number somewhere in the previous document in NavigationDocument or a separate MenuBarDocument.
For this, one option is to try to reload the entire app, to rewrite the cache. Preferably, I'd add the "reloadData" parameter, to restart the app in its current state (btw, how can reloadData be implemented in the code below?). High resource eater, but still... "App.reload" crashes the app with this error:
The operation couldn't be completed. (TVMLKitErrorDomain error 3.)
Xcode logs this in its console:
appController(_:didFailWithError:) invoked with error: Error Domain=TVMLKitErrorDomain Code=3 "(null)"
And the Safari simulator console crashes / closes by itself.
App.onLaunch = function(options) {
var originalOptions = options; // retain the original app launch options, to use later for reload
...
}
var appReload = function() {
App.reload(originalOptions); // this crashes the app
}