LoginSignup
6
6

More than 5 years have passed since last update.

Mobile Chrome AppsでiOSアプリをつくる

Posted at

Chrome Extensionをつくるようにアプリをつくれるし、
既存のChrome Extensionをアプリへ移植できる。
https://github.com/MobileChromeApps/mobile-chrome-apps

ccaインストール

Node.js, Xcodeが入っている前提で
$ sudo npm install -g cca

~$ sudo npm install -g cca
Password:
/usr/local/bin/cca -> /usr/local/lib/node_modules/cca/src/cca.js
cca@0.5.1 /usr/local/lib/node_modules/cca
├── cca-manifest-logic@0.0.6
├── underscore@1.7.0
├── node-uuid@1.4.2
├── xmldom@0.1.19
├── q@1.1.2
├── semver@4.2.0
├── shelljs@0.3.0
├── debounce@1.0.0 (date-now@1.0.1)
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
├── node.extend@1.1.3 (is@2.1.0)
├── crypto-js@3.1.2-5
├── gaze@0.5.1 (globule@0.1.0)
├── elementtree@0.1.6 (sax@0.3.5)
├── gulp-mocha@1.1.2 (through@2.3.6, gulp-util@3.0.2, mocha@1.21.5)
├── chrome-app-developer-tool-client@0.0.4 (q@0.9.7, agentkeepalive@0.2.3, temp@0.7.0, shelljs@0.1.4, adbkit@2.1.6, jszip@2.1.1)
└── cordova@4.2.0 (q@1.0.1, nopt@3.0.1, cordova-lib@4.2.0)

インストール完了

必要ツールインストール

ios-deplpy

実機でテストするのに必要
$ sudo npm install -g ios-deploy

ios-sim

シミュレーターでテストするのに必要
$ sudo npm install -g ios-sim

プロジェクト作成

$ cca create TestChromeApp

ビルド

プロジェクトのルートディレクトリでコマンドからビルドできる

シミュレーター

TestChromeApp$ cca emulate ios

実機

TestChromeApp$ cca run ios

プロジェクトをXcodeで起動

TestChromeApp$ open platforms/ios/TestChromeApp.xcodeproj
※Xcode上で変更してビルドしても反映されないので、必ず下のコマンドをうつ

ファイル変更

ファイルを変更したらccaのコマンドで反映
TestChromeApp$ cca prepare

感想

ChromeのAPIを使えるのでなかなか面白いかもしれない。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6