# iOS Build Guide for Expo

This project uses the **Expo Managed Workflow**, which means the `ios` and `android` native directories are generated automatically via **Continuous Native Generation (CNG)**. You should not see or manually edit an `ios` folder in your project root.

---

## 1. Development (Expo Go)

The easiest way to build/run for iOS during development is using the **Expo Go** app on your iPhone.

1. Install **Expo Go** from the App Store.
2. Run the development server:
   ```bash
   npx expo start
   ```
3. Scan the QR code with your Camera app to open the project in Expo Go.

---

## 2. Local Native Development (Prebuild)

If you need to test native modules, use a custom dev client, or specifically need the `ios` folder for debugging in Xcode:

1. Generate the native directories:

   ```bash
   npx expo prebuild
   ```

   _This will create the `ios` and `android` folders based on your `app.json` configuration._

2. Run on the iOS Simulator (requires macOS + Xcode):
   ```bash
   npx expo run:ios
   ```

> [!WARNING]  
> The `ios` folder is typically gitignored. In the managed workflow, any changes you make manually in the `ios` folder may be overwritten the next time you run `prebuild`. Always use `app.json` or config plugins for permanent configuration.

---

## 3. Production Builds (EAS Build)

To build a `.ipa` file for TestFlight or the App Store, the recommended way is using **Expo Application Services (EAS)**.

1. Install EAS CLI:
   ```bash
   npm install -g eas-cli
   ```
2. Log in to your Expo account:
   ```bash
   eas login
   ```
3. Configure the project (run once):
   ```bash
   eas build:configure
   ```
4. Run a build for iOS:
   ```bash
   eas build --platform ios
   ```
   _EAS will handle certificates, provisioning profiles, and building on their servers (no macOS/Xcode required locally)._

---

## Summary of Commands

| Goal                     | Command                    |
| :----------------------- | :------------------------- |
| **Start Dev Server**     | `npx expo start`           |
| **Generate iOS Folder**  | `npx expo prebuild`        |
| **Run on iOS Simulator** | `npx expo run:ios`         |
| **Build for Production** | `eas build --platform ios` |
