Cross-platform mobile development practice (11)-project structure on various platforms (chrome + Android + IOS + WebOS)

Source: Internet
Author: User

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:

  • Chrome
  • Android
  • IOS
  • Webos

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.