HW9: Your First Mobile App

CMU 15-113: Effective Coding with AI

⚠️ Heads-up: We've updated this assignment to strongly recommend that you either use an Android phone if you have one, or an iPhone simulator otherwise.

You may attempt to use an actual iPhone if you have one and also have a mac (by either following the Development Build without EAS option in Expo, or if you have a paid Apple Developer Account you can probably use Expo Go) but these routes are substantially harder, and we can't make the instructions online any more concise or robust. We did put together a repo with some Claude-generated instructions for iPhones without a paid developer license (and for Android simulators), but we haven't been able to test them on fresh devices so they may have bugs. I've put those and the Expo-related Claude skills here in this repo.
Due Date: Wed. 4/8 at 8:00 PM (Note: This is updated from the original Tue. 4/7 date)
Time Estimate: 3–4 hours (up to 6 if you go ambitious)
Deliverables: Code + README + prompt log on GitHub, short video, Google form submission, portfolio entry

Assignment Overview

Goal: Build a mobile app capable of running on an actual phone or simulator. You'll use React Native with Expo, a framework that lets you build real iOS and Android apps using JavaScript. To do this assignment successfully in a reasonable amount of time, you must leverage AI thoughtfully. We strongly recommend an agentic workflow similar to what you did in HW8. By the end of this assignment, you'll be able to show off a real app that you created.


Why This Matters: Mobile apps are everywhere, and "I built a mobile app" is one of the most impressive things you can put on a portfolio. Mobile development has traditionally had a very steep learning curve, including specialized languages and complex build tools that differ between Android and iOS. After setting up your environment, using AI tools and React Native with Expo will allow you to build a working app on your phone in as little as an hour. This is still a challenging project, however, and you will be unlikely to succeed unless you practice attention to detail and use the strategies you have learned in class so far.

Examples of what you might build:

You're welcome to come up with your own idea! The key is that it should be something you'd actually want on your phone as more than just a webpage or webapp, and something you'd be excited to show other people. Start simple for this assignment! If you have a bigger idea, that could be a perfect choice for your capstone project.

Hardware challenges: Part of the barrier to app development is that certain phones (specifically iPhones) require a fee in order to install your app on your phone. Because of that, you are not required to run your app on an actual phone, and it's ok to use a simulator instead. We recommend developing on a physical Android phone if you have one, and on an iPhone (or Android) simulator if you have an iPhone.
Learning with AI: This assignment is as much about learning a new framework with AI as it is about the final product. React Native and the Expo framework will almost certainly be completely new to you, and that's the point. When AI generates code using unfamiliar patterns (components, hooks, state, navigation), ask it to explain what unfamiliar parts do and why. Your prompt log should show thoughtful engagement with the code and the AI.

Requirements & Scoring

Core Requirements

Optional Enhancements (for extra ambition, not required)

Scope advice: A simple, polished 2-screen app is better than a buggy 5-screen app. Get the basics working first, then add features if you have time. Many often underestimate how satisfying a clean, simple app can be when it actually runs on your phone. Be aware that using external APIs, phone sensors, and other sophisticated features may make it very hard to achieve a working app without a reasonable understanding of the code and how the Expo framework works.

What You Must Submit

Grading

Grade (Roughly) What We're Looking For
A (90-100) App can be demoed and has at least 2 screens with navigation, meaningful user input, and data persistence. Looks intentional and polished. Clean README and prompt log that meet the assignment specifications and show learning (asking AI to explain, not just generate). Evidence of 3-4 hours of effort and some creativity in the concept. Video clearly demonstrates the app.
B (80-89) App runs and has most core features working (screens, input, persistence). Functional but may look rough around the edges. README and prompt log present but less detailed. Video might be a little unclear.
C (70-79) App runs but may be missing one core feature (e.g., no persistence, or only one screen). Basic README, prompt log, and video. Limited evidence of the learning process.
Below C App does not run, or submission is incomplete.

Step-by-Step Instructions

Follow these steps in order, and read carefully. Each one builds on the last, and this sequence is designed to minimize the time you spend stuck. If any step takes significantly longer than the time listed, please ask on Ed or come to office hours!

Step 1: Set Up Your Environment (20 minutes)

For iPhone / iPhone simulator only:

If you're on a Mac, you'll need to install XCode on your laptop from the App Store, and this may take about an hour to download. You should start doing that right now.

For Android:

Search for "Expo Go" in the Google Play Store and install it. Alternatively you can download a beta version of the Expo Go app if you wish to use the very latest version, but we don't recommend this since you'll probably have to unlock dev options on your phone.

For Everyone:

You need Node.js on your computer, and an AI-enabled code editor (you probably already have VS Code or Cursor).

  1. Install Node.js (if you don't already have it): Download the LTS version from nodejs.org. After installing, verify it works by running node --version in your terminal. You should see a version number (18 or higher).
  2. Read and follow the Expo "Create a Project" tutorial:
    • IMPORTANT: The latest phone apps on the App Store and Play Store may be version 54, which is a step behind the dev tools. This means your phone might not be able to use your project unless you replace the 55 with a 54 in the first command of the tutorial:
      npx create-expo-app@latest --template default@sdk-54
    • Be sure to select either "Android Device" or "iOS Simulator" on the second tutorial screen. You should also select "Expo Go" instead of "Development build" to start with, though you may optionally do a Development build later if you wish. (You may attempt to make this work on your real iPhone, but the process will either be expensive and easy with Expo Go or free and difficult with a development build, so we don't recommend this right now.)
    • You will be running commands in your computer's terminal. For Windows this is the Command Prompt, and for macs this will be the Terminal. We don't recommend trying to run these in VS Code. These are not Python commands!
    • Note: When you reach the step where you run npx expo start in your terminal, it will take a moment to load, and then it will show a QR code in your terminal. If you are developing on an Android phone: Make sure your phone is on the same wifi network. Scan the code with your phone camera or the Expo Go app (Android). You should see a default "Welcome to Expo" screen appear on your phone. If you are developing on an iPhone sim: As long as you have XCode and the simulator installed, you should be able to press 'i' to open the simulator with your app.
    • You should read and follow the instructions up through the Next Steps page, and stop before running npm run reset-project since this will remove the demo code.
Important: Your phone and computer must be on the same Wi-Fi network for Expo Go to connect. If you're on campus, CMU-SECURE should work. If the QR code doesn't connect, try the "tunnel" option: press s to switch to Expo Go, then try pressing shift+t to switch the connection to tunnel mode. Ask on Ed if you're stuck—this is a common setup hiccup.
We very very strongly recommend using AI within your IDE, like Copilot, Claude Code, Cursor, etc. You'll have an extremely bad time if you have to constantly copy things into your browser.

Optional but extremely useful: Try to install the Expo AI skills found here. I (Mike) had some trouble with installing the skills to Claude initially, but I asked AI to look a the github repo with the skills and to modify CLAUDE.md so that it has access to them. It created a .claude directory with the cloned skills inside. You can find my CLAUDE.md and claude directory here.
These skills are not strictly necessary, but they're documentation and resources that your AI can use to research how to implement many of the features that you might want. The installation process will vary for each AI.

Step 2: Understand the Basics with AI (10 minutes)

Before you reset the project and start building, spend a few minutes getting oriented. Open the App.js (or App.tsx) file that was generated and ask AI some questions:

Try making a small change to the app, like changing the text or a color, and watch it update on your phone in real time. (If it does not update immediately, you can go to your terminal and press 'r' to reload the app.)

Step 3: Write Your App Specification (30 minutes)

Before you write any code, review the agentic process you used in HW8. If you choose to use an agentic process for this assignment (which we recommend), write a detailed specification for your app in a file called SPEC.md. This is the most important step. As before, write this spec yourself and be thorough. This will help ensure that the app matches your vision and works well.

Keep your app idea simple: two screens, one or two key interactions, and one type of data to persist is plenty.

Useful SPEC.md template: I created this blank SPEC.md template to help me with this step, and I found it very useful. You may not need all of these fields, but we recommend you start by copying this template and then modifying it to suit your needs.

Step 4: The Agentic Build (45 minutes)

Assuming you use an agentic process (which is a very good idea) you'll now hand your spec to your agent of choice (Copilot, Claude Code, Cursor, etc.) and let it build. Refer to HW8 for guidance on the agentic process.

Setup

  1. Add your SPEC.md into the project folder, add the folder to Github (in Github Desktop, click the current repository, click add, and click "add existing repository", and select your project folder) and make your first commit and push. Verify that you can see the app on github.com before proceeding.
  2. If you're lost, make sure you've completed the environment setup from Steps 1 and 2.
  3. Open the project folder in VS Code or Cursor or another AI-enabled IDE.

The Prompt

You might want to set your Agent to its most powerful setting for this step (bearing your usage limits in mind). Give your agent a prompt like this (adapt it to your actual spec):

Read SPEC.md in this project. Implement the full mobile app exactly as specified. 
Create all necessary files, components, and navigation. Make sure that appropriate data is persistent. 
Avoid security risks for sensitive data.  Include proper error handling. 
Make sure the app starts without errors and displays the home screen correctly.

Reminders

Step 5: The AI Review (45 minutes)

Review Setup

  1. Open a new chat session and make sure you're in Agent mode.

The Review Prompt

Give this new agent a prompt like:

Review the React Native/Expo code in this project against the spec in SPEC.md. 
For each acceptance criterion in the spec, verify whether the code actually implements it correctly. 
Also check for:
- Bugs or logic errors
- Missing error handling
- Code quality issues (unclear naming, repeated code, etc.)
- Best practices for React Native or other technologies

Format your review as a numbered list of findings, each marked as [PASS], [FAIL], or [WARN]. 
Be specific. Reference file names and line numbers. 
Export the review as REVIEW.md at the root of the project.

Act on the Review

Step 6: Polish, Test, and Verify (30 minutes)

With the core features working, now polish your app:

Step 7: Document and Submit (30 minutes)

Write your README and prompt log, record your video, add the project to your portfolio, push to GitHub, and fill out the Google form.

For the video, the easiest approach is to screen-record your phone or simulator, or to simply record your phone screen with another device. Walk through each screen, show the user interactions, and demonstrate data persistence.

Important: Your prompt log should include actual prompts, verbatim. Some recommended examples include:

Key Concepts

Here's a reference for the new concepts in this assignment. AI will help you with all of these, but it's useful to know what you're working with.

Tips

Setup Resources

React Native Resources

Troubleshooting

Questions? Ask on Ed, attend office hours, or email the instructor. Consult the course AI usage and collaboration policies on the course homepage.