Search code examples
appceleratormobile-websitehtml5-appcache

How do I customise the auto-generated index.html in appcelerator


I am building a mobile app/mobile web solution in Appcelerator. I want the mobileweb to be capabable of going offline.

I am not using Alloy.

I want to be able to add the appcache statement to the index.html, I also want to be able to make other customisations to this document.

I am aware that I can make the changes after its automatically generated but these would be overwritten the next time I create the file.

Is there anyway to define elements that I want inserted into the index.html as it is auto-generated?


Solution

  • The only way to customize the index.html template is to do it in the Titanium SDK. This means you changes would affect all Mobile Web apps you build.

    We wanted to allow you to customize the Mobile Web templates, but we never got around to actually doing it. :(

    So, I recommend locating the installed Titanium SDK and copying it to something like 5.2.1.GA-MyApp, then customize the templates in mobileweb/src to meet your needs.

    Yes, I know this is gross, but it's about the best workaround today.