移动平台开发学习

[TOC]

Cordova

https://cordova.apache.org/docs/en/latest/guide/cli/index.html

Create your first Cordova app

1
$ sudo npm install -g cordova

Create the App

Go to the directory where you maintain your source code, and create a cordova project:

1
$ cordova create hello com.example.hello HelloWorld

This creates the required directory structure for your cordova app. By default, the cordova create script generates a skeletal web-based application whose home page is the project’s www/index.html file.

Add Platforms

1
2
3
$ cordova platform add ios
$ cordova platform add android
$ cordova platform ls

Install pre-requisites for building

To build and run apps, you need to install SDKs for each platform you wish to target. Alternatively, if you are using browser for development you can use browser platform which does not require any platform SDKs.

Build the App

1
2
$ cordova build
$ cordova build ios

Test the App

1
2
$ cordova emulate android
$ cordova run android

Add Plugins

1
$ cordova plugin search camera

Using merges to Customize Each Platform

Updating Cordova and Your Project

感谢您的阅读,本文由 Hexo 版权所有。如若转载,请注明出处:Hexo(https://bluray.github.io/2019/03/mobileDevStudy/
一楠成长纪录(1)
移动平台开发学习2