Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions cloud_docs/concepts/app-publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ When you publish, the CLI uploads your Flutter app's source code. Serverpod Clou

Releasing a build from TestFlight or the internal testing track to the public store stays in App Store Connect and Play Console.

## Connect the stores

Before you can publish for a platform, connect its store in the [Serverpod Cloud console](https://console.serverpod.dev). Open your project, then open the **App Stores** tab. Each store has a setup guide that walks you through the steps:

- **App Store:** Join the Apple Developer Program, register your app's bundle ID, create the app in App Store Connect, and add an App Store Connect API key. Only the project owner can add the key.
- **Google Play:** Sign up for Play Console, create the app with your app's package name, choose an upload key, and invite Serverpod Cloud's service account to your app in Play Console. Serverpod Cloud can create the upload key for you, or you can upload the keystore you already sign the app with.

The `app doctor` command shows whether each connection is complete, and links to the setup guide when it isn't.

## Set up your app

Run `app setup` from your project's directory to prepare your Flutter app for the stores:
Expand All @@ -53,6 +44,17 @@ serverpod cloud app setup --non-interactive --android-package-name com.yourcompa

Pass `--platforms ios` or `--platforms android` to set up one platform, and `--app-dir` to set up an app somewhere else.

## Connect the stores

Before you can publish for a platform, connect its store in the [Serverpod Cloud console](https://console.serverpod.dev). Open your project, then open the **App Stores** tab.

Each store's setup guide starts after `app setup` has saved the app identifier for that platform. Until then, the guide shows the `app setup` command to run, and it continues by itself when the command is done. The guide then shows your bundle ID or package name, which you enter in the store, and walks you through the steps:

- **App Store:** Join the Apple Developer Program, register your app's bundle ID, create the app in App Store Connect, and add an App Store Connect API key. Only the project owner can add the key.
- **Google Play:** Sign up for Play Console, create the app with your app's package name, choose an upload key, and invite Serverpod Cloud's service account to your app in Play Console. Serverpod Cloud can create the upload key for you, or you can upload the keystore you already sign the app with.
Comment on lines +51 to +54

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guide doesn't continue on its own. The console checks every 5 seconds whether app setup has saved the identifier, then shows "Connected bundle ID …" (or package name) and enables a Continue button that the reader selects (setup_sheet.dart and app_setup_blocker.dart, from serverpod/serverpod_cloud#3229).

With app setup now first on the page, a reader who follows it in order never sees that waiting screen, so it fits in a note after the steps:

Suggested change
Each store's setup guide starts after `app setup` has saved the app identifier for that platform. Until then, the guide shows the `app setup` command to run, and it continues by itself when the command is done. The guide then shows your bundle ID or package name, which you enter in the store, and walks you through the steps:
- **App Store:** Join the Apple Developer Program, register your app's bundle ID, create the app in App Store Connect, and add an App Store Connect API key. Only the project owner can add the key.
- **Google Play:** Sign up for Play Console, create the app with your app's package name, choose an upload key, and invite Serverpod Cloud's service account to your app in Play Console. Serverpod Cloud can create the upload key for you, or you can upload the keystore you already sign the app with.
Each store's setup guide shows your bundle ID or package name, which you enter in the store, and walks you through the steps:
- **App Store:** Join the Apple Developer Program, register your app's bundle ID, create the app in App Store Connect, and add an App Store Connect API key. Only the project owner can add the key.
- **Google Play:** Sign up for Play Console, create the app with your app's package name, choose an upload key, and invite Serverpod Cloud's service account to your app in Play Console. Serverpod Cloud can create the upload key for you, or you can upload the keystore you already sign the app with.
:::note
If you open a guide before running `app setup`, the guide shows the command to run. When the command is done, it shows the connected bundle ID or package name. Select **Continue** to open the steps.
:::


The `app doctor` command shows whether each connection is complete, and links to the setup guide when it isn't.

## Check your app with app doctor

Run `app doctor` from your project's directory before you publish:
Expand Down Expand Up @@ -174,7 +176,7 @@ The version must be a Flutter release version, and it can't be lower than the Fl

The stores identify your app by its bundle ID on iOS and its package name on Android. Serverpod Cloud reads them from your Flutter app: the bundle ID from the Xcode project in `ios/`, and the package name from `applicationId` in `android/app/build.gradle.kts` or `build.gradle`.

A new Flutter app uses a `com.example` placeholder, which the stores don't accept. Replace it with your own identifier, such as `com.yourcompany.yourapp`, in both places. The [`app setup`](#set-up-your-app) command does this for you. The identifier must match the app you created in App Store Connect and Play Console.
A new Flutter app uses a `com.example` placeholder, which the stores don't accept. Replace it with your own identifier, such as `com.yourcompany.yourapp`, in both places. The [`app setup`](#set-up-your-app) command does this for you. Use the same identifier when you create the app in App Store Connect and Play Console.

To publish with a different identifier than the one in your app's files, set it in `scloud.yaml`:

Expand Down
15 changes: 15 additions & 0 deletions cloud_docs/reference/scloud-yaml-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ project:
app:
dir: "../my_app_flutter"
flutterSdk: "3.50.0"
xcodeVersion: "26.6"
identifiers:
ios: "com.yourcompany.yourapp"
android: "com.yourcompany.yourapp"
Expand Down Expand Up @@ -99,6 +100,20 @@ project:
flutterSdk: "3.50.0"
```

#### xcodeVersion

**Type:** string. **Optional.**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The CLI also accepts a number here (YamlUnion({String, double}) in scloud_config_io.dart, with the note "Unquoted, a version like 27.2 is a YAML number"). The quoting advice below already steers readers to a string, so the type line can match the code:

Suggested change
**Type:** string. **Optional.**
**Type:** string or number. **Optional.**


The Xcode version to build your iOS app with, such as `26.6`. When unset, iOS builds use the Xcode version that Serverpod Cloud selects. Android builds ignore this setting. Put the version in quotes: without them, YAML reads a version such as `26.10` as the number `26.1`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The style guide's section 8 (updated in #931) keeps colons for bold lead-ins and for sentences that introduce a list, table, or code block. This one joins two clauses, so "because" fits better:

Suggested change
The Xcode version to build your iOS app with, such as `26.6`. When unset, iOS builds use the Xcode version that Serverpod Cloud selects. Android builds ignore this setting. Put the version in quotes: without them, YAML reads a version such as `26.10` as the number `26.1`.
The Xcode version to build your iOS app with, such as `26.6`. When unset, iOS builds use the Xcode version that Serverpod Cloud selects. Android builds ignore this setting. Put the version in quotes, because YAML reads an unquoted version such as `26.10` as the number `26.1`.


If the value isn't a version in the form `major.minor` or `major.minor.patch`, `serverpod cloud app publish` stops with an error. If the build machines don't have that Xcode version, the iOS build fails.

```yaml title="scloud.yaml"
project:
app:
xcodeVersion: "26.6"
```

#### identifiers

**Type:** map with the optional string keys `ios` and `android`. **Optional.**
Expand Down
Loading