LoginSignup
1
0

More than 5 years have passed since last update.

XCode10でReact-Nativeのプロジェクトを実機のiPhoneで試験する

Posted at

概要

XCode10でReact-Nativeで作成したプロジェクトを実機のiPhoneで試験しようとした際に詰まったので、その対処法メモ

実行環境

  • XCode10.0
  • React-Native 55.4
  • iPhone 7

No member named 'rip' in 'darwin_arm_thread_state64'

XCode上にて実機でビルド実行を行おうとした際、上記エラーが表示された。

対処法

React-Nativeプロジェクトディレクトリ内の
./node_modules/react-native/third-party/glog-0.3.4/src/config.h
を開いて以下の行を編集する。

config.h
/* How to access the PC from a struct ucontext */
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip

config.h
/* How to access the PC from a struct ucontext */
#if defined(__arm__) || defined(__arm64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__pc
#else
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#endif

編集後、再度ビルドを試したら無事実行された

備考

React-Nativeの古いバージョンがXCode10に対応していない為に発生したっぽい?
RN0.57ならこのエラーは発生しないかも

参考リンク

react-native issue #19839

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