Step 01: Using ChatGPT to Setup Cursor and XCode for Native iOS Prototype

I’ve been following the vibe coding threads online, but until now, I’ve only been dabbling here and there. This was my first serious experiment at vibe coding. It’s a multipart experiment with this first part focusing on using ChatGPT to assist in the the setup of Cursor (and XCode).

[Subtitle]
[description]

Experiment goals

I’ve been feeling overwhelmed by all the new developments lately—exciting, yet intimidating. Keeping up can sometimes feel impossible. To ease my anxiety, I finally set aside some time to dive in. Initially, I wrote down everything I hoped to achieve with this experiment, but that quickly became overwhelming. Once I realized this first attempt didn’t require custom design kits or tokens, everything fell into place. Leveraging open-source kits and trusted components meant I could focus entirely on building a solid workflow. Since I knew I wanted this to be an iOS application, here’s where I landed…
➤ Leverage ChatGPT as a guide to conduct my first vibe coding experiment
➤ Learn my way around Cursor (Pro)
➤ Setup a new Cursor project and learn about the good practice principles for doing so
➤ Generate an iOS view within the new project
➤ Preview the generated iOS view in XCode

Tools and prerequisites

Since this experiment focused on setting up a workflow it’s important to mention the list of tools I started with and their purpose which included:
➤ ChatGPT (my guide through the process)
➤ Cursor Pro (vibe coding using AI agent model)
➤ Apple XCode (for previewing Cursor code)

Getting started

I’d used coding IDEs before and was already somewhat familiar with Cursor going into this experiment. But since the goal was to learn something new, it would’ve been a missed opportunity not to treat ChatGPT like an engineering expert sitting beside me—ready to field questions as they came up. So I threw some basic questions at ChatGPT to get a conversation started. Here’s how some of that conversation unfolded:
➤ I asked ChatGPT…
On my local drive, i have a directory structure consisting of the following:
Projects Root
--> Code Project 1
--> Code Project 2
--> Code Project 3

I want to use Cursor to vibe code. I'm new to Cursor. Each code project listed above will use its own codebase. the projects folders are not related to each other.

If I want to work on Code Project 2, which folder should I open in Cursor? Which folder is considered the "Workspace" 
Some of ChatGPT’s responses to my basic questions were a little confusing and contradictory, but after a mild volley, we sorted it all out.

Informing Cursor of my goals

I have been reading about Rules and Model specifications a lot lately. The information I’ve seen on various social media threads give these artifacts merit so I wanted to dig into their value-add potential further with ChatGPT. I baked my desire to establish project-level rules and specs into a ChatGPT Goals prompt.
➤ I asked ChatGPT…
I've opened a project root folder in Cursor titled "PURE-EXPERIMENTAL-VIBE". it does not contain any files or folders. I am using a paid version of Cursor so I have access to a variety of coding agents and models.

##Goals
I want to use AI to build and design a native application using the Apple iOS design system
I want to adhere to Apple's Human Interface Guidelines and best practices
I want to establish rules and model specifications to ensure the engineering model I'm using has guard rails to build the code I request

What are the first steps I should take to achieving the goals outlined?
➤ ChatGPT response…
Step 1: Define the Project Foundation
Inside PURE-EXPERIMENTAL-VIBE, create:

README.md — Describe the app’s purpose and intended platform.

/.cursor/rules — Create a rule file to guide AI behavior (details below).

/App — Folder to hold your Swift code.

/Design — Folder to store references to Apple’s Human Interface Guidelines, mockups, and component notes.

/Docs — Optional, for keeping research and notes.
ChatGPT went on to suggest content for the RULES.md file…
name: iOS Native App Guidelines
description: |
  Build using Swift and SwiftUI. Use only native Apple frameworks.
  Follow Apple's Human Interface Guidelines (HIG) strictly.

rules:
  - Use Swift 5 and SwiftUI.
  - All UI components must follow Apple’s Human Interface Guidelines.
  - Do not use third-party libraries or UI frameworks.
  - Name files and views according to Swift best practices.
  - Use MVVM (Model-View-ViewModel) architecture.
  - Group related views and models into logical folders.
  - Write clear inline documentation where decisions might be non-obvious.
  - Use Accessibility modifiers in all views.
  - Ask before generating navigation or state management code.
…as well as content for the HIG.md file…
# Apple Human Interface Guidelines (HIG) Reference

This document provides curated links and summaries to help guide design and development of a native iOS app using Swift and SwiftUI, in full compliance with Apple’s Human Interface Guidelines.

---

## Core Design Principles

Apple encourages developers to build experiences that are:
- **Clarity** – Interfaces are legible, precise, and easy to understand.
- **Deference** – UI helps focus attention on content, not chrome.
- **Depth** – Transitions and layers help provide hierarchy and context.

Source:  
https://developer.apple.com/design/human-interface-guidelines/ios/overview/themes/

---

## SwiftUI Design Essentials

Guidance specific to SwiftUI components and layouts:
- Layout, color, and typography best practices
- Built-in control usage
- View modifiers and spacing conventions
- Toolbar and navigation behaviors

Source:  
https://developer.apple.com/design/human-interface-guidelines/swiftui/overview/

---

## Accessibility Guidelines

Ensure your app is usable by everyone:
- Use meaningful labels and hints
- Add accessibility modifiers to all interactive elements
- Support dynamic type and voiceover
- Maintain minimum touch target sizes

Source:  
https://developer.apple.com/accessibility/ios/

---

## Interface Layout and Adaptivity

For responsive design and orientation handling:
- Support Auto Layout with SwiftUI equivalents
- Use `GeometryReader` for adaptive layouts
- Honor safe areas and system spacing
- Test on multiple screen sizes and accessibility settings

Source:  
https://developer.apple.com/design/human-interface-guidelines/platforms/ios/

---

## Typography

- Use `Text` with native fonts like `Font.title`, `Font.body`
- Support Dynamic Type
- Avoid hardcoded font sizes

Source:  
https://developer.apple.com/design/human-interface-guidelines/typography/

---

## Color & Contrast

- Prefer semantic colors (`.primary`, `.secondary`, etc.)
- Support both light and dark modes
- Use SF Symbols for scalable icons

Source:  
https://developer.apple.com/design/human-interface-guidelines/color/

---

## Checklist for Each Screen

- [ ] Uses only native SwiftUI components
- [ ] Adheres to HIG visual hierarchy and spacing
- [ ] Supports accessibility out of the box
- [ ] Uses system font sizes and colors
- [ ] Follows MVVM with clean separation of concerns

---

This file serves as a living reference as design evolves. Keep it updated with component-specific decisions or notes as you build.

Using GPT-4o in Cursor to generate my experiment’s native iOS app shell

Up until this point, I’ve been setting up the Cursor environment–it’s a solid start and my confidence is fairly high that I’m heading in the right direction. I’m not really “vibe coding” yet but, getting closer…
➤ I tell ChatGPT I’m ready to start coding in Cursor
let's start generating some views in Cursor. should I first ask the Cursor agent to setup the default, out-of-the-box, styles according to Apple's interface guidelines? should I ask the agent to compose a screen? what should I do first?
➤ ChatGPT response…
First Move: Ask the Agent to Scaffold a Native App Shell
Before composing a screen or writing styles, start with a scaffolded SwiftUI app that:
	1.	Uses Apple’s default navigation and app structuring
	2.	Organizes folders by MVVM (Models, Views, ViewModels)
	3.	Follows your .cursor/rules (HIG, SwiftUI, Accessibility, etc.)
A few more prompts and I was able to build-out four views and a working main navigation bar.

Setting up Apple XCode (IDE) to preview Cursor’s AI-coded work

Let’s recap. I’ve set up a Cursor environment, built the application shell, and generated a main navigation control along with the core iOS views. Now I’m ready to preview those views using Apple’s Xcode. I’m holding off on tools like Alex Sidebar for now—not just to avoid the extra cost, but because the goal of this experiment is to stay focused on what Cursor can do.
➤ I inquire about setting up XCode for previewing Cursor work…
Cursor is producing Swift code and generating views. I now want to preview the front-end using XCode. Walk me through the steps to accomplish this.

##Goals
Preference is to use a single source of truth for code across Cursor and XCode.
➤ ChatGPT response…
STEP 1: Create New Xcode Project
1. Open Xcode
2. Choose File > New > Project
3. Select App
4. Click Next
5. Use the following:
    • Product Name: [project-name]
    • Interface: SwiftUI
    • Language: Swift
6. For Team and Bundle Identifier, use defaults or fill if needed.
7. Uncheck “Include Tests”
8. Save it somewhere temporary (you’ll reference the real files later)
9. Once created, delete the default ContentView.swift and PureExperimentalApp.swift files from the Xcode project (but not your Cursor code).
Let’s recap. I’ve set up a Cursor environment, built the application shell, and generated a main navigation control along with the core iOS views. Now I’m ready to preview those views using Apple’s Xcode. I’m holding off on tools like Alex Sidebar for now—not just to avoid the extra cost, but because the goal of this experiment is to stay focused on what Cursor can do.