Because you need to package applications into native apps on various platforms, You need to assemble applications according to the project structure of each platform. Although the main program is developed based on HTML5, however, we still need to build a set of projects on each platform. The following describes the project structures of the versions I have developed:
1) Chrome
Chrome is very simple. The standard HTML code structure can make it a Chrome APP by adding a manifest. json description file. The project structure is shown in:
Manifest. json:
{ "name": "Starteam chrome", "description": "Starteam mobile chrome version.", "version": "1", "app": { "launch": { "local_path": "app.html" } }, "icons": { "24": "css/images/icon_24.png", "48": "css/images/icon_48.png", "128": "css/images/icon_128.png" }, "permissions": [ "unlimited_storage", "notifications" ]}
Then install the project folder in the chrome extension.
2) Android
The Android project structure is recommended based on Phonegap:
Where:
- Src: class files related to android native
- Assets/www: The program subject, including static resources such as HTML, JS, CSS, and images.
- AndroidManifest. xml: Project description file
3) IOS
Where:
- CordovaLib. xcodeproj: phonegap framework source code
- Www: The program body, including HTML, JS, CSS, images, and other static resources.
- Plugins: phonegap custom plug-in
- Supporting Files: Project Resource and description file
4) Webos
The mojo or enyo framework is not used here. Therefore, the project structure is relatively simple:
Appinfo. json is the project description file:
{"id": "com.hp.starteam.mobile.webos","version": "1.0.0","vendor": "hp","type": "web","main": "app.html","title": "starteam-mobile-webos","icon": "icon.png","uiRevision": 2}
Based on this file, you can package the application as a webos native app.