تخطَّ إلى المحتوى

How to get each .env variable

هذا المحتوى غير متوفر بلغتك بعد.

This page explains, variable by variable, where each .env value comes from and how to set it. For the at-a-glance table see the environment variables reference; for creating the keys step-by-step see Get your API keys.

You only need these for Sync and Test keys. The preview, New/Current toggle, Try template and Review Diff need nothing.

The local port the preview server listens on (default 8092). Pick any free port — e.g. PORT=8092.

Path to the repo that holds your fastlane metadata + credentials (default ../../.app_dist). Only set this if you keep keys in a separate repo.

Your iOS bundle id, e.g. vn.fighttech.go2048. Where: App Store Connect → your app → General → App Information → Bundle ID.

One issuer id per team (a UUID). Where: App Store Connect → Users and Access → Integrations → App Store Connect API → shown at the top as Issuer ID. Copy it verbatim.

The id of a specific API key (10 chars, e.g. 5F4KKWDHNV). Where: same Keys page → the Key ID column of the key row.

The private key. You need the Admin or App Manager role to create one. Where: click Generate API Key, name it, choose access App Manager, then download AuthKey_<KEYID>.p8 — it downloads only once.

Put it in .env one of two ways:

# A) path to the file
ASC_KEY_P8="./AuthKey_5F4KKWDHNV.p8"
Terminal window
# B) embed as single-line base64 (preferred — self-contained .env)
ASC_KEY_P8_B64="$(base64 -i AuthKey_5F4KKWDHNV.p8)"

Your Android package name, e.g. vn.fighttech.go2048. Where: Google Play Console → your app (top of the dashboard).

A Google service-account key with access to your Play app. Where:

  1. Google Cloud Console → IAM & Admin → Service Accounts → create one in the project linked to Play.
  2. Keys → Add key → Create new key → JSON → download sa.json.
  3. Play Console → Users and permissions → Invite new users → invite the service-account email and grant your app’s release + listing permissions.
# A) path
PLAYSTORE_SERVICE_ACCOUNT_JSON="./sa.json"
Terminal window
# B) embed as single-line base64
PLAYSTORE_SERVICE_ACCOUNT_JSON_B64="$(base64 -i sa.json)"
Path (ASC_KEY_P8, ..._JSON)Base64 (ASC_KEY_P8_B64, ..._JSON_B64)
Stored asa file beside .enva single line inside .env
Portable to another machinecopy 2 filescopy only .env
Used bylocal devExport ▸ Env / desktop app

The tool’s Export ▸ Env always emits the base64 form, so the .env is fully self-contained.

Open the PlaygroundImport → Env, paste your .env, click 🔌 Test keys. The tool authenticates against both stores without saving and shows ✓/✗ per store. A common failure is App Store 401 — that means the ASC_KEY_ID / ASC_ISSUER_ID / .p8 don’t match a valid key (check for placeholders or a truncated base64). Once green, Save .env then Sync.