How to build an iPhone app in Xcode: a beginner walkthrough

Short answer
- Xcode is Apple’s free app for building iPhone, iPad, Mac, Watch, TV and Vision Pro apps. Version 27.2 is a 3.1 GB download from the Mac App Store.
- It only runs on a Mac: the current version needs macOS 26.6 or later and an Apple M1 chip or newer.
- You can build and test on your own iPhone with a free Apple Account, but apps installed that way stop working after 7 days and you’re limited to 3 devices.
- Publishing to the App Store needs the Apple Developer Program at $99 a year. Since 28 April 2026, every upload must be built with Xcode 26 or later.
- Apple says App Review handles 90% of submissions in under 48 hours, and over 40% of unresolved issues come from one guideline: app completeness.
Xcode is the workshop where native iPhone apps get made. You write the code there, preview the screens, run the app on a pretend iPhone on your Mac, then package it and send it to Apple. It’s free, it’s big, and the first hour in it can feel like sitting in an aircraft cockpit.
Getting from “new project” to “my app is on my phone” is quicker than it looks. The snags come later, around signing and Apple’s rules, and I’ll flag each one.
This is part of our guide on how to make an app in 2026, which covers every route from no-code to fully custom. Every step, limit and price below was checked against Apple’s own documentation on 6 December 2026.
What do you need to build an app in Xcode?
You need a Mac with an Apple silicon chip, the free Xcode app, and a free Apple Account. That’s enough to build an app and run it on your own iPhone. You only pay when you want other people to install it.
The Xcode listing on the Mac App Store shows version 27.2 as free, 3.1 GB, and requiring macOS 26.6 or later on a Mac with an Apple M1 chip or later. The same listing spells out the account rules: testing or running apps on an Apple device needs a free Apple Account, and submitting to the App Store needs Apple Developer Program membership.
Plan for more disk space than 3.1 GB. Xcode adds pieces as you go, like simulator runtimes (the software that pretends to be a particular iPhone and iOS version), which you manage under Xcode, Settings, Components.
| What you need | Cost | What it lets you do |
|---|---|---|
| A Mac with Apple M1 or later, on macOS 26.6 or later | Your own hardware | Running Xcode 27.2 at all |
| Xcode 27.2 from the Mac App Store | Free (3.1 GB download) | Writing code, previews, simulators, debugging |
| Free Apple Account (Personal Team) | Free | Running your app on up to 3 of your own devices, reinstalled every 7 days |
| Apple Developer Program | $99 a year | TestFlight, App Store Connect, App Store distribution |
Sources: Mac App Store Xcode listing, Apple developer account help and Apple Developer Program page, all checked 6 December 2026.
Is Xcode free, and can you use it on Windows?
Xcode is free, and it only runs on a Mac. Apple’s listing is on the Mac App Store and names macOS and Apple silicon as requirements. There’s no Windows or Linux version.
On Windows, you’ve got two realistic choices: get access to a Mac (an M1 meets the current minimum), or pick a route that doesn’t need Xcode. Cross-platform frameworks like React Native and Flutter let you write one codebase for iPhone and Android, and our native vs cross-platform guide explains the trade-offs. No-code builders and agencies handle the Apple side for you, which I cover at the end.
How do you make an app with Xcode, step by step?
You create a new project from the App template, give it a name and an organisation identifier, build your screens in SwiftUI, and press Run. Here’s the walkthrough, based on Apple’s page on creating an Xcode project.
1. Create the project
Open Xcode. On the Welcome to Xcode window, choose App from the New Project pop-up menu, or go to File, New, Project. To pick the platform yourself, choose Choose Template from the same menu and select iOS (or Multiplatform if you want one app across Apple’s devices), then the App template.
If a banner says platform support is missing, click Get. You can’t build or run until that download finishes.
2. Fill in the options
Xcode asks for a handful of things. Most are easy to change later. The organisation identifier deserves a moment’s thought, because it becomes your bundle ID and that gets locked in once you upload.
- Product name. The name as you want it on the App Store and on people’s phones. You can change it later in the project’s General pane.
- Team. The account Xcode uses to sign your app (signing is Apple’s way of proving the app came from you and hasn’t been tampered with). Add your Apple Account here, or later.
- Organisation identifier. Usually your domain name backwards, like com.yourcompany. Xcode uses it to create the bundle ID, the unique label Apple uses for your app everywhere.
- Interface and language. Pick SwiftUI for the interface and Swift for the language. That’s the combination Apple’s own beginner tutorials use.
Choose the bundle ID with care. Apple’s guide to preparing your app for distribution says you can’t change it after your first build reaches App Store Connect. Until then you can edit it in the General pane. Use a domain you own, and keep it plain.
3. Find your way around the window
The main window has four areas you’ll use most: the navigator on the left lists your files, the editor in the middle is where you type, the inspector on the right shows settings, and the canvas previews the screen you’re working on.
A fresh project already has a preview set up. Change some text and the canvas updates. Apple’s Xcode page says live previews let you interact with a view as you would on a device. Type, look, tweak.
4. Build your screens
SwiftUI describes screens as stacks of views (text, images, buttons, lists) arranged vertically or side by side. If you’ve never written code, start with Apple’s free Develop in Swift tutorials, which tour Xcode, build a small messaging prototype in SwiftUI, then cover app design, testing and agentic coding.
5. Run it in the simulator
Choose an iPhone model from the run destination menu in the toolbar and click Run (or Product, Run). Apple’s page on running your app says Xcode builds the app, shows it on a simulated device in Device Hub and opens a debugging session in the debug area. If the build fails, the errors appear in the Issue navigator.
The simulator is fast and lets you try phone sizes you don’t own. But Apple says simulators don’t replicate a real device’s performance or features, so test on your phone too.
Do you need to know Swift to use Xcode?
You need some Swift to build anything real, but Xcode now helps you write it. Xcode 27 has a built-in coding assistant that works with AI agents and models you switch on.
Apple’s coding intelligence setup page shows ChatGPT (usable with or without an account) and Claude Sonnet and Opus (sign-in needed) under Xcode, Settings, Intelligence. You can also add other providers. Once an agent is on, you open the coding assistant with Command-0 and describe what you want. According to Apple’s guide to writing code with intelligence, the agent can build your app to check its work and fix build errors itself, and you can roll changes back from the conversation history (that needs your project in a Git repository).
That makes Xcode far friendlier. But when the agent gets something wrong (and it will), you need to read the code well enough to spot it, especially anything touching user data.
Building in Cursor or Claude Code instead? The same Apple rules apply at the end, as our guide to getting a Cursor or Claude Code app onto the App Store explains.
How do you run your app on a real iPhone?
Pair the iPhone with your Mac, turn on Developer Mode, sign in with your Apple Account in Xcode, pick a team and a unique bundle ID, then choose the phone as the run destination and press Run.
- In Xcode, go to Settings, Apple Accounts and sign in.
- Select your project, open Signing & Capabilities, and click Set Up Signing if it appears. Choose your team and enter a unique bundle ID. If the bundle ID is already taken, Xcode warns you and disables the Set Up button.
- Leave “Automatically manage signing” on. Xcode then registers the device and creates the development provisioning profile (the file that says “this app may run on this phone”) for you.
- On the iPhone, open Settings, Privacy & Security and turn on Developer Mode under Security. The phone warns you, restarts, then asks you to confirm and enter your passcode. Apple’s page on Developer Mode notes the option only appears once you’ve started pairing the device with a Mac.
- Choose the phone in the run destination menu and click Run.
Now the catch for free accounts. Apple’s developer account help says a free account works as a Personal Team with these limits:
| Free Personal Team limit | Apple’s rule |
|---|---|
| App IDs | Up to 10, each expiring after 7 days |
| Devices | Up to 3, each expiring after 7 days |
| Apps per device | Up to 3 |
| Provisioning profiles | Expire 7 days from issue, then you rebuild and reinstall |
| Testers, TestFlight, App Store | Need the paid Apple Developer Program |
Sources: Apple developer account help (limits) and the Mac App Store Xcode listing (paid program for the App Store), checked 6 December 2026.
So if your app stops opening a week after you installed it, plug the phone in and run it from Xcode again.
How do you publish an app from Xcode?
You join the Apple Developer Program, finish your project settings, create an archive, and upload it to App Store Connect from Xcode’s Organizer. Then you fill in the store listing and submit for review.
Here’s the sequence, from Apple’s guide to distributing your app.
- Join the program. The Apple Developer Program is $99 a year. Apple then creates an App Store Connect account for you. If you haven’t enrolled yet, our Apple developer account guide covers personal versus organisation sign-up.
- Finish the project settings. Bundle ID, team, supported devices, app icon, version number (shown on the App Store, in the form 1.0.0) and build string. Apple warns that most of this can’t be edited after you distribute a build.
- Archive. Choose a scheme and run destination, then Product, Archive. The archive is a release build of your app that lands in the Organizer (Window, Organizer).
- Validate. Select the archive and click Validate App. Xcode runs a quick automated check before you upload anything.
- Distribute. Click Distribute App and choose an option (see the table). The default handles signing, bumps the build number and uploads your symbols so crash reports make sense.
- Create the app record. If you haven’t already, Xcode asks for the details to create one in App Store Connect. Apple’s add a new app help lists the fields: platform, name, primary language, bundle ID, SKU and user access. The Account Holder has to sign the latest agreement first.
- Test, then submit. Apple’s guide says to put your final build through a beta test method before release. That’s TestFlight, which our TestFlight guide walks through. Then add screenshots (our screenshots guide has the sizes), description and privacy details in App Store Connect and submit.
| Distribute App option in Xcode | What it does | When to use it |
|---|---|---|
| TestFlight & App Store | Signs automatically, updates the build number, uploads with symbols | Your normal route to testers and the App Store |
| TestFlight Internal Only | Uploads for your team only and blocks App Store submission | Development builds you never want released by accident |
| Release Testing | Exports a signed build for devices your team registers | Testing on known devices before release |
| Debugging | Exports a build for registered devices with sandbox testing for some capabilities | Chasing bugs on real devices |
| Custom (App Store Connect, Ad Hoc, Development) | Lets you pick each setting yourself | When you need control over signing or build numbers |
Source: Apple, Distributing your app for beta testing and releases, checked 6 December 2026. Enterprise and Mac-only options left out.
Two rules catch people who follow old tutorials. Apple’s upcoming requirements page says that since 28 April 2026, apps uploaded to App Store Connect must be built with Xcode 26 or later using the iOS 26 SDK. And since 9 September 2026, iPhone and iPad uploads must target iOS 13 or later. An old Mac stuck on an old Xcode can’t ship to the store any more.
Review is quick. Apple’s App Review page says it typically reviews at least 50% of submissions in under 24 hours and 90% in under 48 hours. Publishing on Google Play is a separate job outside Xcode, and our guide on how to publish your app covers both stores.
Xcode submission check
Xcode submission check: 16 checks from first build to App Store upload
Answer yes, no or not sure for your iPhone app. You get a readiness score out of 100, the gaps to fix first, and a report you can copy or print.
What trips beginners up in Xcode?
Most first-timers get stuck on signing, the bundle ID, or App Review issues that have nothing to do with code. Each one below comes from Apple’s own guidance.
Signing errors on the first run
If Xcode won’t install on your phone, check signing first: signed in under Settings, Apple Accounts, a team selected in Signing & Capabilities, and a unique bundle ID. One someone else has registered won’t work, even on your own phone.
Trusting the simulator too much
Apple says some hardware-specific features might not be available in a simulator, and that you should test those on a physical device. Test on a real phone before you ask anyone else to.
Placeholder content and dead links
Apple’s App Review page says over 40% of unresolved issues are under guideline 2.1, app completeness: crashes, placeholder content and missing information. Every app needs a working link to user support and to a privacy policy. If your app has a login, put a demo account in App Review Information. Our guide to writing an app privacy policy covers that link.
Missing purpose strings
If your app touches sensitive data like the camera, photos or location, Apple requires a purpose string: a short, plain sentence in your app’s Info.plist file explaining why you need it. Apple’s note on purpose strings says it appears in the permission request. Every app that accesses user data needs one.
Is Xcode hard for a beginner?
I think Xcode itself is learnable in a few sessions. Swift, app design and Apple’s rules take far longer, and that’s where most of your learning time goes if you’re starting from zero.
If you want to become a developer, Xcode is a brilliant place to start: free tutorials, instant previews and an assistant for the blank screen. Our guide on how to become an app developer maps out the learning path.
If you want an app for your business’s customers, it’s often the slow route. You’d learn Swift, signing and Apple’s review rules, and still only have the iPhone half.
Is there an easier way to get an iPhone app than Xcode?
Yes. Depending on what the app does, you can use a no-code app builder, have an AI-assisted build done for you, or hire developers who do the Xcode work.
For the common small business apps (bookings, loyalty stamp cards and points, food ordering, push notifications, forms and content pages), our app builder publishes to the App Store, Google Play and as a web app without you opening Xcode. It’s free for up to 10 app users, then $49 a month for up to 1,000 or $99 a month unlimited. Apple’s $99 a year Developer Program fee still applies, as it does on every route to the App Store.
If you’ve already built something in Xcode, or with an AI tool, and you’re stuck at the submission stage, our Managed Launch covers testing on real devices, store listings, submission and up to 2 resubmissions per store: $299 for one store or $499 for both. We can’t promise an approval date, and we don’t.
For something bespoke, our breakdown of no-code vs AI vs custom development compares the costs and timelines side by side. And if you want the bigger picture of every way to make an app, head back to our guide on how to make an app in 2026. The App Tools directory also lists the main frameworks and SDKs if you’re weighing Swift against the alternatives.
FAQ
Is Xcode free to use?
Yes. Xcode is free on the Mac App Store. You only pay the $99 a year Apple Developer Program fee when you want TestFlight testers or the App Store.
Can I build an iPhone app on Windows with Xcode?
No. Xcode only runs on a Mac, and version 27.2 needs macOS 26.6 or later and an Apple M1 chip or newer.
Can I put an app on my iPhone without paying Apple?
Yes, with a free Apple Account you can install your own app on up to 3 devices. The provisioning profile expires after 7 days, so you rebuild and reinstall from Xcode each week.
What language does Xcode use for iPhone apps?
Swift is the language and SwiftUI the interface framework you pick when creating a new iPhone project. Apple’s free Develop in Swift tutorials teach both.
Can AI write my app inside Xcode?
Xcode 27 has a coding assistant that works with agents and models including ChatGPT and Claude, and it can build your app and fix build errors. You still need to read and check the code it writes.
Which Xcode version do I need to publish an app?
Since 28 April 2026, Apple only accepts uploads built with Xcode 26 or later using the iOS 26 SDK. Apps must also target iOS 13 or later since 9 September 2026.
How long does App Store review take after uploading from Xcode?
Apple says it typically reviews 90% of submissions in under 48 hours. A rejection adds another round.
Last Updated on December 6, 2026 by Ian Naylor