# Copy the App Store ID of the app from App Store Connect into .env

The step `review.app_store_id`, for [`in_app_review`](https://doc.saymyframe.com/modules/in-app-review.md).

The app opens its page in the store of the platform through `appReview.openStorePage()` of the [store reviews](https://doc.saymyframe.com/guides/reviews-and-feedback.md#the-page-of-the-app-in-its-store) role. On Android that is the Google Play page of the application id of the flavor `prod`, which the app knows already. On iOS it is the App Store page of the App Store ID in `REVIEW_APP_STORE_ID` of `.env`, the Apple ID of the app in App Store Connect, which only you can copy.

While that key is empty, the app has no App Store page: `appReview.hasStorePage` is `false` on iOS, the row "Rate the app" of the settings screen does not show there, and a debug build on iOS prints which key to fill in. In an app with [`update_required`](https://doc.saymyframe.com/modules/update-required.md), the screen "Update required" never shows on iOS either, since its button leads to that page. The review dialog itself needs no ID.

The App Store ID is the ID of one app in App Store Connect: the one that users install from the App Store, which a build for a store names with `--flavor prod`. `.env` is one file for all [flavors](https://doc.saymyframe.com/guides/flavors.md), so every build opens the page of that app, also a build of `dev`. Nothing repeats for the other flavors.

**1. Find the App Store ID.** In [App Store Connect](https://appstoreconnect.apple.com/), open **Apps** and the app that you publish. Its Apple ID is a number of digits, such as `1234567890`. It is also the number after `id` in the address of the page of the app in the App Store, such as `https://apps.apple.com/app/id1234567890`.

**2. Put it into .env.** In `.env` at the root of the app:

```bash title=".env"
REVIEW_APP_STORE_ID=1234567890
```

Only digits count: any other value, such as the bundle id or an address, counts as none. `.env` stays out of git. On another machine, copy `.env.example` to `.env` and fill it in again.

**3. Start the app again.** The `flutter` tool reads `.env` when a command starts, so stop `flutter run` and start it again with the values:

```bash
flutter run --dart-define-from-file=.env
```

Run and Debug of VS Code, and the run configuration of the app in Android Studio, pass the argument for you.

**Check.** On iOS, a debug build no longer prints that `REVIEW_APP_STORE_ID` has no App Store ID, and in an app with a settings screen the row **Rate the app** shows there. On an iPhone, a tap on it opens the App Store on the page of the app where the user writes a review.
