# App StoreからXcodeをインストール
# または
xcode-select --install
sudo gem install cocoapods
# Homebrewを使用
brew install node
# または公式サイトから
# https://nodejs.org/
npm install -g @react-native-community/cli
cd tk_b_2501/frontend
# iOSプロジェクトを初期化
npx react-native init MobileApp --template react-native-template-typescript
# または既存のプロジェクトをiOS対応にする
npx react-native init MobileApp
# Metro bundlerを起動
npm start
# 別のターミナルでiOSアプリを起動
npm run ios
# または特定のシミュレーターを指定
npx react-native run-ios --simulator="iPhone 14"
cd ios
pod deintegrate
pod install
# Xcodeでシミュレーターを手動起動
# または
xcrun simctl list devices
npx react-native run-ios --simulator="iPhone 14"
npx react-native start --reset-cache
- コード編集:
App.tsxやその他のコンポーネントを編集
- ホットリロード: 変更が自動的にシミュレーターに反映
- デバッグ: Chrome DevToolsまたはFlipperを使用
- テスト: Jestでユニットテストを実行
- Apple Developer Accountが必要
- Provisioning Profileの設定
- 実機でのビルド・実行
npx react-native run-ios --device