Help us understand the problem. What is going on with this article?

Cordova(PhoneGap)でのアプリ開発のはじめ方

More than 5 years have passed since last update.

2014年2月時点の情報です。

node/npmのインストール

これは、Nodebrewを使う場合。
既にNode.jsとnpmが導入されている場合は、Cordovaのインストールからで可。

nodebrew install v0.11.11
nodebrew use v0.11.11

Cordovaのインストール

npm -g install cordova

プロジェクトの作成

アプリ名、ドメインは適当に。

cordova create haruka_cordova jp.co.artisanedge.cordova.haruka Haruka
cd haruka_cordova

プラットフォームの追加

ここでは、iOSとAndroidを追加する場合。

cordova platform add ios
cordova platform add android

プラグインのインストール

最近のCordovaはAPIで提供される機能はプラグインとして別途インストールなので。

cordova plugin add org.apache.cordova.device-motion
cordova plugin add org.apache.cordova.camera
cordova plugin add org.apache.cordova.media-capture
cordova plugin add org.apache.cordova.device-orientation
cordova plugin add org.apache.cordova.network-information
cordova plugin add org.apache.cordova.contacts
cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.battery-status
cordova plugin add org.apache.cordova.file-transfer
cordova plugin add org.apache.cordova.geolocation
cordova plugin add org.apache.cordova.globalization
cordova plugin add org.apache.cordova.inappbrowser
cordova plugin add org.apache.cordova.media 
cordova plugin add org.apache.cordova.dialogs
cordova plugin add org.apache.cordova.vibration
cordova plugin add org.apache.cordova.splashscreen

実行

実機で実行する場合。

cordova run android
cordova run ios

エミュレータで実行する場合。

cordova emulate android
cordova emulate ios

localhost:8000とかでWebとしてデバッグする場合。

cordova serve
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした