0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Apache CordovaでiOSエミュレータ起動まで

Last updated at Posted at 2019-03-07

MacでApache Cordovaを使い、iOSアプリを作成する方法です。

前提として、nodeとnpm、XCodeのインストールをしておく。
その上で、cordova、ios-deploy、cocoapodsをインストールする。
#インストール

$ sudo npm install -g cordova

# --unsafe-perm=trueをつけないとエラーになる
$ sudo npm install --unsafe-perm=true -g ios-deploy

$ sudo gem install -n /usr/local/bin cocoapods
$ pod setup

#サンプルアプリの作成・実行

$ cordova create hello
$ cd hello
$ cordova platform add ios
$ cordova emulate ios --target="--device--" --buildFlag="-UseModernBuildSystem=0"
Cordova-ios.png

環境

  • macOS Mojave
  • XCode 10.1
  • node v11.6.0
  • npm 6.9.0

公式ドキュメント
https://cordova.apache.org/docs/en/latest/guide/cli/index.html

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?