@rsmazara
We are working on adding projects to mobione which will make this task super simple. But until that time here is how I go about adding custom resources to my app.
1) use Run in Test Center to generate the code for my UI
2) copy the resources such as javascript lib(s) to the generated xxx_export\ directory that contains all the HTML for my webapp
3) to include a custom javascript library in my webapp I either
a) manually edit your main html file and add a <script type=”text/javascript” src=”mylib.js”></script> to the HEAD section
or
b) dynamically load the library in the xxx_custom.js such as the following snippet where I load the svg rafael.js library
/**
* Called when document is loaded.
*/
phoneui.documentReadyHandler = function() {
$.getScript("raphael.js", function() {
init(); //my function to init custom app state after raphael lib is loaded
});
}
4) With the main webapp page loaded in the Test Center emulator, I use the Send to Phone action to test on my iOS device. Note that the Test Center’s Send To Phone wizard allows you to view and include/exclude resources that are uploaded to AppSync.