How to Build an iOS App From Your Phone (No Mac Required)

Build your first SwiftUI app on your iPhone with FreeMilk, for free: sample prompts for a habit tracker, a streamed simulator preview and checks for every step.

An iPhone standing in the grass of a sunset farm, showing a FreeMilk conversation that starts with a prompt for a health tracker.

A good first iOS app does one small job well. In this guide, that job is tracking a few daily habits: create a habit, mark it complete and come back to it later. You'll use FreeMilk on your iPhone to describe the app, preview it in a streamed iOS simulator and refine the result with follow-up prompts.

Use the sample prompts below as a starting point for your own project. Each step includes a behavior to check, so you can decide when your version is ready for the next feature.

What you need before you start.

Install FreeMilk from the App Store on your iPhone, and check the listing for current device requirements. Keep an internet connection available for builds and the streamed preview. There's nothing to buy first: FreeMilk is free, and ads fund a daily allowance of coding models that refills every day.

You don't need a Mac. FreeMilk compiles Swift projects on remote Macs with Apple's toolchain. For the details of where the code, the build and the simulator fit together, start with how FreeMilk works without a local Xcode setup.

1. Define the smallest useful habit tracker.

Begin with a Today screen, an Add Habit form and local storage. Leave reminders, accounts and social features for a later version. Choose observable behavior for the first build: you can add a habit, see it in the list, mark it complete and undo that action.

First prompt to adapt
Create a native iOS habit tracker in Swift and SwiftUI.

The Today screen should list my habits and show how many I have completed today. Each habit has a name and a button to mark it complete or undo completion.

Add a form for creating a habit. Require a nonempty name, and let me cancel without saving. Let me delete a habit after confirmation.

Store habits and completion dates locally. Keep previous days' records when the date changes. Use standard iOS controls, readable text, and support the system's light and dark appearance. Start without accounts, reminders, or a backend.
A prompt card asking for a native iOS habit tracker, beside an iPhone standing in a sunset meadow showing a Habits app with one of two habits done.
The first prompt asks for one small loop: a Today screen, a short list of habits and a running total.

This brief defines both the screens and the rules. The line about completion dates matters: marking a habit complete today shouldn't permanently mark it complete for every future day. Writing that down early gives you a clearer way to judge the result.

2. Build and test the first loop.

Let FreeMilk write the project and build it on a remote Mac. When the simulator stream is ready, try the simplest journey: create a habit called Read, mark it complete and undo it. Then create a second habit and check whether the progress total changes correctly. After that, work through a few edge cases:

  • Before adding any habits, check whether the empty screen explains what to do.
  • Try saving an empty name and a name containing only spaces.
  • Cancel the Add Habit form and check that it creates no record.
  • Complete one of two habits, then undo completion and check both totals.
  • Enter a long habit name and check whether it remains readable.

If the build fails, use the reported error as the starting point for your next instruction. If the app runs but a check fails, describe that specific behavior before asking for more features. Small corrections are easier to evaluate when the app still has only a few moving parts.

3. Report one problem clearly.

Imagine that marking Read complete updates its row but leaves the total at zero. Give FreeMilk the starting state, the action, the actual result and the expected result. This makes the bug reproducible and gives you a precise check to repeat after the fix.

Example bug report
I have two habits, Read and Walk, and neither is complete today. I tap the completion button next to Read. The row changes to completed, but the Today total still says 0 of 2.

The total should change to 1 of 2 immediately, and return to 0 of 2 if I undo completion. Fix this behavior while keeping the existing screens and saved data.

For a visual problem, name the element and where it sits on the screen, then state the change in concrete terms: make the button easier to tap, let the habit name wrap or increase the contrast of the progress label. Build again and check both the changed area and the original add-and-complete journey.

4. Check that data survives a new session.

An app can appear to save data while keeping it only in temporary memory. Relaunch the generated app in the same simulator and check that your habits and today's completion state remain. Leaving the preview isn't the same as quitting the app, so make sure your check actually relaunches it. Resetting or replacing the simulator is a different test and may erase its local data.

Ask for an explanation of saving behavior
Explain how this app stores habits and completion dates. Make sure they survive an app relaunch. Explain what happens at the start of a new day and how I can test that behavior. Keep the data local for this version.

For daily habits, also check what happens when the date changes. Today's count should start fresh while previous completion records remain available. If you later add streaks or history, these rules will be the foundation of those features.

5. Add one feature after the basics work.

A seven-day history is a useful next feature because it builds on the data you already have. Describe what each day means, where the history should appear and how it should react when you change today's completion. Keep the existing behavior stable as you add it.

Example follow-up feature
Add a detail screen for each habit with its completion history for the last seven calendar days, including today. Label the dates and distinguish completed days from missed days. Future dates should not appear.

Keep the Today screen and its completion behavior working as before. Use the existing stored completion records.

Repeat the checks from the first version after each feature. For more ways to describe changes, use the examples in our SwiftUI prompting guide.

Two iPhones in a meadow: the Today screen of a habit tracker, and a new detail screen showing the last seven days for a habit called Read.
One feature at a time: the history screen builds on the completion records the Today screen already saves.

6. Prepare for testing on your iPhone.

Your simulator preview runs on a remote Mac. To evaluate an installed app, you'll need a device build, with the required code signing and device setup. On the device, repeat the core actions, check larger text sizes and appearance settings, and verify saved data after closing and reopening the app.

If you want to distribute a public release, prepare the app for Apple's App Review process. Account setup, signing, screenshots, app information and any necessary privacy disclosures belong to that stage, and our App Store checklist walks through it. A running preview gives you an app to test; release preparation is the next piece of work.

You can also export the complete Xcode project and continue with a developer on a Mac. The habit tracker remains a Swift project you can extend as its requirements grow.

Start with the first prompt, get the add-and-complete loop working, and use the checks above to guide your next change. If you're still comparing ways to build without a Mac, our guide to building an iPhone app without a Mac covers the other options.

Frequently asked questions.

Do I need a Mac to build an iOS app from my phone?

No. FreeMilk compiles Swift projects on remote Macs with Apple's toolchain and streams a live, tappable iOS simulator to your iPhone.

Do I need to know how to code?

No. You describe the app in plain words and check how it behaves. If you do code, every file is yours to read and change.

What should my first app be?

Something small with one clear job, like the habit tracker in this guide. Get the core loop working and tested before you add reminders, history or accounts.

Can I move the project to Xcode later?

Yes. FreeMilk exports your Swift project as a complete Xcode project, so you or a developer can continue on a Mac.

Touch Grass
Build Stuff

Download on the App Store