概要
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ならこのエラーは発生しないかも