Share or export a project's source
Publish a link to a project's source with an optional PIN, see what visitors get, stop sharing, and save the source to a file.
You can get a project’s source out of AirBuild in two ways:
- Share Project puts the source on a web page with its own link. People who open the link can download the source or import it as a new project in their own Team.
- Export Source Code… saves the source to a file for you.
| Share Project | Export Source Code… | |
|---|---|---|
| What you get | A link that looks like air.build/s/… |
A file, source.tar.gz |
| Who can get the source | Anyone with the link who signs in to AirBuild, and who has the PIN if you set one | You |
| Git history | Not included | Included |
| Later changes to the project | Not included until you tap Update | Not included: the file is the project at the time you export it |
Anyone in the Team can share or export a project’s source, not only the Team’s owner. A project has one share, and everyone in the Team sees and manages that same share. In a local Team, the Mac that runs the Team has to be on with AirBuild open.
Share a project
- Open the project’s profile: tap the project’s icon and name at the top of its chat (on the Mac, click it).
- Tap the share button (Share) at the top of the profile, then tap Share Project.
- The Share Source Code sheet opens with “Shares this project’s source code, not an app.” Check the Title, which starts as the project’s name, and add a Description if you want one. They name the page and show in link previews.
- To ask for a PIN, turn on Require PIN (see Ask for a PIN).
- Tap Publish.
The sheet shows “Preparing your share…” with a progress bar while AirBuild packs the source. When the share is ready, the status under the title says Public and three buttons appear:
- Copy Link copies the link. The button changes to Copied.
- Share… opens the system share sheet.
- Open Page opens the page in your browser.
The link is also shown on its own row, without https://.
The status under the title says where the share stands:
| Status | What it means |
|---|---|
| Not Shared | The project has no share. |
| Preparing | The source is being packed for the first time. The link doesn’t work yet. |
| Public | The link works. |
| Updating | A new copy of the source is being packed. The link keeps serving the previous copy until the new one is ready. |
| Failed | The first copy didn’t finish: “The source code couldn’t be exported. Try again.” Tap Try Again. |
The page uses the project’s icon as it was when you published. Changing the project’s icon later doesn’t change the share’s, and the sheet has no way to change it.
What the shared source contains
- The project’s files as they were when you published or last tapped Update.
- Not the files the project’s
.gitignoreleaves out. - Not the Git history: the repository itself (
.git) is left out. - Not a built app. People get the source and build it themselves.
Ask for a PIN
A PIN is four digits that people need before they can import or download the source. Without the PIN, anyone with the link can still see the page.
- In Share Source Code, turn on Require PIN. The PIN field fills in four random digits.
- Keep them, or type your own four digits. The sheet says “People with the link need this PIN to import or download the source code.”
- Tap Publish, or Save if the share already exists. The button stays off until the PIN has four digits.
The PIN isn’t part of the link, so send it to people yourself. You can read it again in the sheet at any time.
To change the PIN, type new digits and tap Save. To remove it, turn off Require PIN and tap Save. The next person who imports or downloads needs the new PIN, or none. An import already under way isn’t affected.
Change the title or description
Open Share Source Code again, edit Title or Description, and tap Save. Save appears only once something has changed, and stays off while the title is empty.
Update the shared source
The share is a copy of the source at one moment. It doesn’t follow the project’s later changes on its own.
- Open Share Source Code again.
- The Source Code row says when the copy was made, for example “Updated 2 days ago”. Tap Update.
The status turns to Updating and the sheet shows “Updating your share…”. The link stays the same. People who open it get the previous copy until the new one is ready, then the new one. Only the newest copy is kept.
Stop sharing
- Open the project’s profile, tap the share button (Share) and tap Share Project.
- Tap Delete Share.
- The app asks Delete Share?: “The public link will stop working. You can create a new share later.” Tap Delete Share.
The link stops working at once. If you share the project again, the new share gets a new link; the old link doesn’t come back.
A share doesn’t expire and can’t be paused. It lasts until someone in the Team deletes it, or until the project is deleted (see Delete a project). Moving the project to another Team also ends its share (see Move a project to another Team).
What people see when they open the link
The page shows:
- pictures of the app in phone frames, side by side, when the project has screenshots: the cover screenshot first, then the others
- the project’s icon
- Import as a new project and Download source
The page shows the share’s title only when it has no pictures or no icon. Signed in, the page shows “Signed in as name” with Use another account.
Anyone can open the page. To import or download, people need an AirBuild account. If they aren’t signed in, pressing either button takes them to sign in, then carries on with the button they pressed.
When the share has a PIN, pressing either button asks Enter PIN: “Ask the person who shared this project for its 4-digit PIN.” They type it and press Continue, or Cancel. A wrong PIN asks again with “That PIN isn’t right. Check it with the person who shared this project.” The page asks only once per visit.
Import as a new project
- Press Import as a new project.
- Sign in and enter the PIN if the page asks.
- The page chooses the Team the project goes to (see below) and says, for example, “Importing into Cloud Team…”.
- When it’s done, the page says “Imported as “name”. Open AirBuild to continue.” Press Open AirBuild.
Which Team the project goes to:
| Your Teams | Where the project goes |
|---|---|
| One Team | That Team. |
| More than one, at least one in the cloud | A cloud Team, without asking. |
| More than one, all local | Choose a team lists them, for example “Local Team · Mac name”. Pick one, or press Cancel. |
The import makes a new project with the share’s title and icon. It doesn’t take the original app’s Bundle ID or its App Store Connect link: the first signed build in your Team asks for a Bundle ID of its own. When the import finishes, the files are in the new project and you can ask your Agents to work on them.
Importing your own share into your own Team is allowed. It’s a way to make a copy of a project.
Download source
Press Download source. The page says “Preparing download…”, then “Download started.” The file is a .tar.gz named after the share’s title. Like the import, it has no Git history.
If the page shows an error
| What the page says | What to do |
|---|---|
| This share is unavailable | The share was deleted, its project was deleted or moved, or the share isn’t ready yet. Ask the person who shared it for a new link. |
| This share is no longer available. | The same: the share went away while the page was open. |
| That PIN isn’t right. Check it with the person who shared this project. | Ask for the PIN again. It may have changed. |
| This Team is already busy with another import or move. | Wait for the other import or move to finish, then press Import as a new project again. |
| Import is unavailable because this Team’s environment is not running. | For a local Team, open AirBuild on the Mac that runs it. Then try again. |
| Download is temporarily unavailable. Please try again. | Press Download source again in a moment. |
| Unable to load this share | Reload the page in a moment. |
Export the source to a file
Start from the project’s menu or from its profile:
Export Source Code… and Download Code do the same thing.
- The Export Source Code sheet shows the project’s name and a progress bar: Preparing Source Code…, then Downloading Source Code….
- When it’s ready, the sheet says “Use the exported source code on your Mac to build and test your app.” Tap Save Source Code….
- Choose where to save
source.tar.gz. On the Mac, the sheet then says “Saved “file name”” and offers Show in Finder.
If you close the sheet before the file is ready, the export stops.
The file holds the project as it is now:
- the files in the project, except the ones
.gitignoreleaves out, such as build outputs and caches - the Git history
It’s not a built app and not an earlier version of the project. Exporting doesn’t change the project. Whether the project opens in Xcode straight away depends on how the project is set up.
The archive has no folder of its own around the files, so unpack it into a new folder. On a Mac, in Terminal:
mkdir MyApp
tar -xzf source.tar.gz -C MyAppExport from Files
The project’s Files (on iPhone, tap the tabs button with four squares in the top-right corner of the chat and tap Files; on the Mac, choose View › Go To › Files) has an Export button:
- With no file open, it exports the whole project as a
.zipnamed after the project, with the files in one folder. It holds the same files as Export Source Code…, Git history included. - With a file open, it exports only that file.
On the Mac, you pick where to save it. On iPhone and iPad, the share sheet opens, where you can save to Files or send it to another app. If the export fails, the app shows Unable to Export Source with the reason.
Messages in the app
| Message | What to do |
|---|---|
| A PIN is 4 digits. | Type exactly four digits. |
| This project’s Environment is offline. Open AirBuild on the Mac that hosts it and try again. | Open AirBuild on the Mac that runs the local Team, then tap Try Again. |
| This project’s Environment is still starting. Try again in a moment. | Wait a moment, then tap Try Again. |
| This project’s Environment needs an update before it can share. | For a local Team, update the Mac that runs it (see Update the host Mac). |
| This project is busy with another task. Wait for it to finish and try again. | Another job, such as an import or a move, is running on the project. Wait for it to end. |
| The source code couldn’t be exported. Try again. | Tap Try Again. In a local Team, check that the Mac is on with AirBuild open. |
| The file couldn’t be saved. Try again. | Save again, to another place if it fails twice. |
| The source archive came back empty, so nothing was saved. Try again. | Close the sheet and export again. |
| The source code wasn’t saved completely. Try again. | The partial file was removed. Tap Try Again to save it again. |