Documentation Index
Fetch the complete documentation index at: https://docs.newly.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
To create subscriptions and submit your app to the App Store, you need an Apple Developer Program membership.Connecting your Apple account
- Open the Deploy modal in the Newly dashboard (click “Deploy” on your project)
- Click Build & Deploy and select iOS
- The Apple Credentials section will appear
Automatic setup (recommended)
- Enter your Apple ID email and password
- Complete two-factor authentication if prompted (code sent to your trusted device or phone)
- Select your team from the list of teams associated with your Apple account
- Newly auto-provisions all required keys — you’ll see checkmarks as each one is created
- Select or create your app — Newly pre-fills the name and bundle ID from your project
Manual setup
If you prefer to manage your own keys, you can upload them individually:- ASC API Key — Key ID + .p8 private key file
- IAP Key — Key ID + .p8 private key file
- APNs Key — Key ID + .p8 private key file
- Team ID and Bundle ID
What gets auto-provisioned
During automatic setup, Newly creates three API keys in your Apple Developer account:| Key | Purpose |
|---|---|
| ASC API Key (.p8) | Manage products and subscriptions in App Store Connect |
| IAP Key (.p8) | Allow RevenueCat to validate subscription receipts from the App Store |
| APNs Key (.p8) | Enable push notifications (e.g., subscription renewal reminders) |
How products get created in App Store Connect
Once your Apple credentials and RevenueCat catalog both exist, Newly automatically creates matching products in App Store Connect:- A subscription group called “NSubscriptions”
- Subscription products with the same product IDs as your RevenueCat catalog
- English localizations for each product
Setup order doesn’t matter. You can connect Apple first and RevenueCat later, or the other way around. Newly detects which pieces are already in place and fills in the gaps automatically.
Production SDK keys
After the store setup completes, Newly:- Creates App Store and Play Store app entries in your RevenueCat project
- Attaches your Apple credentials (ASC + IAP keys) to the RevenueCat app
- Fetches production SDK keys (
appl_*for iOS,goog_*for Android) - Writes the keys to your app’s
app.jsonautomatically
Under the hood
You don’t need to know this to use Newly, but it may help if you’re debugging or curious about how the automation works.Idempotent operations
All automated operations are safe to run multiple times:- Catalog creation skips products that already exist in RevenueCat
- ASC product creation skips subscriptions that already exist in App Store Connect
- Store setup updates credentials on existing RevenueCat apps rather than creating duplicates
Token management
RevenueCat OAuth tokens expire after approximately 1 hour. Newly handles this automatically:- Tokens are auto-refreshed before API calls when expired
- Concurrent requests are handled safely — if multiple operations detect an expired token at the same time, only one refresh happens and the others pick up the new token
- If auto-refresh fails (e.g., the token was revoked), you’ll see a “Reconnect RevenueCat” prompt
Retrigger mechanism
When you upload Apple credentials after RevenueCat is already connected, a background task automatically:- Re-runs store setup (attaches credentials to your RevenueCat apps)
- Creates ASC subscription products (if your catalog already exists)
- Fetches updated production keys
Product ID uniqueness
Product identifiers in App Store Connect are globally unique and can never be reused — even after deletion. To prevent collisions, Newly appends a project-scoped hash to each product ID:Credential reference
| Credential | Purpose | How it’s obtained |
|---|---|---|
| ASC API Key (.p8) | Manage App Store Connect products | Auto-provisioned or manual upload |
| IAP Key (.p8) | RevenueCat receipt validation | Auto-provisioned or manual upload |
| APNs Key | Push notifications | Auto-provisioned |
| RC Access Token | RevenueCat API calls | OAuth flow, auto-refreshed hourly |
| RC Refresh Token | Refresh the access token | OAuth flow, rotated on each use |