> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rork.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to test & publish your Rork app via Xcode

> This guide walks through the required setup, how to open your project in XCode, run it locally, archive builds, and troubleshoot common issues so you can move from code to the App Store efficiently and with confidence.

export const CtaBanner = () => <div style={{
  display: "flex",
  alignItems: "center",
  justifyContent: "space-between",
  gap: "24px",
  flexWrap: "wrap",
  margin: "40px 0 8px",
  padding: "22px 28px",
  borderRadius: "16px",
  background: "linear-gradient(135deg,rgba(249,115,22,0.10),rgba(255,255,255,0.03),rgba(249,115,22,0.06))",
  border: "1px solid rgba(255,255,255,0.08)"
}}>
    <div>
      <div style={{
  fontSize: "19px",
  fontWeight: 700,
  color: "#fff",
  letterSpacing: "-0.3px",
  lineHeight: 1.3
}}>
        Build your app with Rork today.
      </div>
      <div style={{
  fontSize: "14px",
  color: "rgba(255,255,255,0.6)",
  marginTop: "4px",
  lineHeight: 1.5
}}>
        Ship iOS, Android, and web apps by chatting with AI.
      </div>
    </div>
    <a href="https://rork.com" style={{
  flexShrink: 0,
  display: "inline-block",
  padding: "10px 24px",
  background: "linear-gradient(135deg,#fff,#f0f0f0)",
  color: "#000",
  fontSize: "14px",
  fontWeight: 600,
  borderRadius: "100px",
  textDecoration: "none",
  whiteSpace: "nowrap"
}}>
      Try Rork for Free
    </a>
  </div>;

### Why do you need Xcode?

Xcode is great because it helps you track logs and look more in-depth at why your app may or may not work. It also allows one-click submission to the App Store and is very efficient due to its being an Apple product.

\
**Requirements**

* Mac OS computer
* Connected to GitHub
* GitHub desktop app installed
* Xcode app installed
* VSCode installed
* Apple Developer Account

### Installing Xcode

Download Xcode from the App Store

<img src="https://mintcdn.com/rork/DPzJFF7dKqS_bOmg/images/image-17.png?fit=max&auto=format&n=DPzJFF7dKqS_bOmg&q=85&s=6f6e717440f5f2652740d15b0f241dd7" alt="Image" width="1594" height="1238" data-path="images/image-17.png" />

### Opening your Rork project in Xcode

Connect to GitHub

<img src="https://mintcdn.com/rork/DPzJFF7dKqS_bOmg/images/image-15.png?fit=max&auto=format&n=DPzJFF7dKqS_bOmg&q=85&s=c077edced98910a393a77be7959721af" alt="Image" width="1644" height="390" data-path="images/image-15.png" />

Go to GitHub

<img src="https://mintcdn.com/rork/DPzJFF7dKqS_bOmg/images/image-18.png?fit=max&auto=format&n=DPzJFF7dKqS_bOmg&q=85&s=effb4b185999189a84c570a12043273e" alt="Image" width="1516" height="892" data-path="images/image-18.png" />

Open with GitHub Desktop

<img src="https://mintcdn.com/rork/DPzJFF7dKqS_bOmg/images/image-19.png?fit=max&auto=format&n=DPzJFF7dKqS_bOmg&q=85&s=4da997dce1da7ee49b123c60de9d0049" alt="Image" width="1646" height="1342" data-path="images/image-19.png" />

Right-click the name of your app and open it in VS Code:

<img src="https://mintcdn.com/rork/DPzJFF7dKqS_bOmg/images/image-20.png?fit=max&auto=format&n=DPzJFF7dKqS_bOmg&q=85&s=88926a854b2d7722ca8e15a9cfbcf381" alt="Image" width="1650" height="528" data-path="images/image-20.png" />

Now you'll need to set up your environment

If you're using Rork Max, just type:

```shellscript theme={null}
Xed .
```

If not:

\
**Install Homebrew (if not installed)**

```shellscript theme={null}
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

**Install Node.js (includes npm)**

```shellscript theme={null}
brew install node
```

**Verify:**

```shellscript theme={null}
node -v
npm -v
```

**Install Yarn**

```shellscript theme={null}
npm install -g yarn
```

**Verify:**

```shellscript theme={null}
yarn -v
```

**Install Expo CLI**

```shellscript theme={null}
npm install -g expo
```

**Verify:**

```shellscript theme={null}
npx expo --version
```

**Install Xcode Command Line Tools**

```shellscript theme={null}
xcode-select --install
```

**Accept license:**

```shellscript theme={null}
sudo xcodebuild -license accept
```

**Install CocoaPods**

```shellscript theme={null}
sudo gem install cocoapods
```

**Verify:**

```shellscript theme={null}
pod --version
```

**Install Project Dependencies**

From project root:

```shellscript theme={null}
yarn
```

**Run iOS Prebuild and Open Xcode**

```shellscript theme={null}
yarn && npx expo prebuild -p ios && xed ios
```

After this, your project should open up in Xcode.

### Here are some issues you may run into and how to solve them:

**If iOS Folder Already Exists**

```shellscript theme={null}
npx expo prebuild -p ios --clean
```

**If Dependencies or Pods Break**

```shellscript theme={null}
rm -rf node_modules ios
yarn
npx expo prebuild -p ios
```

**If CocoaPods Fail**

```shellscript theme={null}
cd ios
pod deintegrate
pod install
cd ..
```

## Final Requirement Check

```shellscript theme={null}
node -v
npm -v
yarn -v
npx expo --version
pod --version
```

### After your project is open in Xcode, publish to the App Store (via TestFlight)

Navigate to "Product" and click "Archive."

<img src="https://mintcdn.com/rork/DPzJFF7dKqS_bOmg/images/image-21.png?fit=max&auto=format&n=DPzJFF7dKqS_bOmg&q=85&s=5eef7441b78c934e99032e1a061770e6" alt="Image" width="1654" height="536" data-path="images/image-21.png" />

To test in the simulator:

Hit the play button, and then go back to your VS Code terminal and run: yarn start

## Troubleshooting:

<img src="https://mintcdn.com/rork/DPzJFF7dKqS_bOmg/images/image-24.png?fit=max&auto=format&n=DPzJFF7dKqS_bOmg&q=85&s=81991729ae9c658dab76ba6f14f3acd5" alt="Image" width="1870" height="566" data-path="images/image-24.png" />

Delete any .lock file, IOS, Android, or node\_modules file. Then rerun the commands before. \
\
Other commands to try:

* Yarn install.
* npm expo prebuild
* Xed ios
* npm expo start

<CtaBanner />
