Skip to content
tezvyn:

Archiving an iOS App for Distribution

Source: developer.apple.comEasyHow cards are made

Archiving an iOS App for Distribution

Archiving an app bundles your code and assets into a distributable package. It's the final step before sending your app to beta testers on TestFlight or submitting it to the App Store.

Why it exists

Archiving was created to solve the problem of preparing a finished application for the outside world. A development build on your machine is different from a release build for users. Archiving creates a standardized, optimized, and self-contained package suitable for distribution through official channels.

The mental model

Think of archiving as creating a shrink-wrapped box for a retail product. During development, all the parts are on your workbench. Archiving gathers the finished product (your app binary), its instruction manual (debug symbols), and packaging info into a single, sealed container called an .xcarchive. This container is then ready to be shipped to stores (the App Store) or early reviewers (TestFlight testers).

How it works

Inside Xcode, you select "Product > Archive". This triggers a special build process using 'release' configurations, which apply code optimizations. Xcode compiles your app and packages the resulting binary, resources, and crucial debugging information (dSYM files) into the .xcarchive bundle. This bundle then appears in Xcode's Organizer window, which acts as a control panel for validating the app and uploading it to Apple's App Store Connect service.

When to use it

Use archiving any time you need to send a build to Apple's distribution platform. This happens in three main cases: first, for internal quality assurance testing with your team; second, for distributing to external beta testers using TestFlight; and third, for submitting your app to the App Store for public release. It is the formal gateway from your computer to the world.

When not to use it

Do not use archiving for your daily development and debugging cycle. For that, use the standard "Run" action (the play button). Running creates a debug build and installs it directly onto a simulator or connected device, allowing for fast iteration, live debugging, and immediate feedback. Archiving is a heavier, more deliberate process for builds you intend to ship.

One canonical example

A developer finishes a new feature and wants feedback from beta testers. In Xcode, they change the run destination from an iPhone Simulator to "Any iOS Device (arm64)". They then navigate to the menu bar and select "Product > Archive". Once the process completes, the Organizer window opens, showing the new archive. From here, they click "Distribute App", follow the prompts to upload to TestFlight, and can then invite testers to download the new build from the TestFlight app.

Interview question

For which scenario is archiving an iOS app the correct procedure?

  • a.Analyzing code performance during a live debugging session.
  • b.Preparing an optimized package for submission to TestFlight or the App Store.Correct
  • c.Running the app on a simulator to check UI layout changes.
  • d.Installing a debug build onto a connected device for immediate testing.
Why?

Archiving is specifically for creating a standardized, optimized, and self-contained package suitable for distribution through official channels like TestFlight or the App Store. The other options describe scenarios for daily development and debugging, which use the standard 'Run' action.

Just read this? Test yourself on what you have been reading.

Read the original → developer.apple.com

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on ios — each one lists the topics its interview covers.

See open roles