0
0

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.

react-native run-ios 実行時にiOSシミュレータのバージョンが古いと怒られたときの対処法

Posted at
react-native run-ios

react-native による iOSアプリ開発時に、上記コマンドで simulator を立ち上げようとすると、以下のように simulator の機体の version で怒られることがある。

Cound't find iPhone 6 simulator

このとき以下を実行したところ、現状(2019年9月)で最新版の iPhone X で simulator が立ち上がった。
package.json の package をアップデートすることにより、 react-native 側のバグが修正された version を使用できるようだ(参考記事回答#10を参照)。

npm install -g npm-check-updates
ncu -u react-native
npm install

ncu は npm-check-updates という Node.js のモジュールで、 package.json の npm のバージョンを書き換えてくれるコマンド。 個別の npm を更新するためにはその名前を引数に指定するだけでよい。-u オプションを指定することで、実際に書き換えを行なっている。
筆者の場合 package.json は "react-native": "0.60.5" に更新された。

ちなみに

react-native では以下コマンドで simulator の機体の version を指定できる(例:iPhone 6s の場合)。

react-native run-ios --simulator 'iPhone 6s'

参考記事

https://stackoverflow.com/questions/52783369/could-not-find-iphone-6-simulator-after-upgrade-to-xcode-10
http://tacamy.hatenablog.com/entry/2016/08/10/193603

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?