Skip to main content
Find complete deployment steps in your project Building Your App

OpenRouter Setup

Before deploying, you need to set up the AI proxy through Supabase Edge Functions. This keeps your API keys secure on the server.
Never bundle API keys in your iOS app. Keys can be extracted from the binary. Our architecture routes all AI requests through Supabase Edge Functions.
1

Generate OpenRouter API Key

Sign up or sign in to OpenRouter:
  1. Create your first project
  2. Generate your API key
This is a private key. We will deploy it directly to our Supabase Edge Function and never bundle it with our app or push it to git.
2

Set OpenRouter Key as Supabase Secret

Set your OpenRouter key as a Supabase secret:
This keeps your API key secure on the server side.
3

Deploy AI Edge Function

Deploy the AI Edge Function to Supabase:
The boilerplate includes a ready-to-deploy Edge Function that handles all AI API calls securely.
4

Verify Deployment

Verify your function is deployed:
  1. Go to Supabase DashboardEdge Functions
  2. See your ai function listed
  3. Note down the function URL
5

Update the proxy config

Open Config/Secrets.xcconfig in Xcode and set the base URL plus path. The function name (ai) is the PROXY_PATH, not part of PROXY_BASE_URL:
Then run the update script:

Deployment Phases

1

Pre-Deployment

  • Run the full test suite (~598 tests across 12 package test targets + the app test suites, one Boilerplate.xctestplan run)
  • Fix all linter warnings
  • Test on real devices
  • Update legal documents
2

TestFlight Beta

  • Archive build
  • Upload to App Store Connect
  • Add internal testers
  • Gather feedback
3

App Store Submission

  • Prepare metadata
  • Create screenshots
  • Submit for review
  • Monitor status
4

Production Launch

  • Configure production backends
  • Monitor crashes
  • Respond to reviews
  • Plan updates

Pre-Deployment Checklist

  • All tests pass (⌘U)
  • No warnings in build
  • Tested on real device
  • Performance is smooth
  • No crashes in common flows
  • Real backends configured (not mock)
  • API keys in Config/Secrets.xcconfig
  • Bundle ID matches App Store Connect
  • Version number set (e.g., 1.0.0)
  • Build number set (start at 1)
  • App icon (1024×1024)
  • Screenshots for all sizes
  • App description written
  • Keywords added
  • Support URL set

TestFlight Deployment

1. Archive Build

2. Validate Archive

3. Upload to App Store

4. Add Testers

Internal Testers (up to 100):
  • App Store Connect → TestFlight → Internal Testing
  • Add team members
  • They receive email invite
  • Install via TestFlight app
External Testers (up to 10,000):
  • Create group: “Beta Testers”
  • Add email addresses
  • Requires beta review (1-2 days)
  • Public link available

5. Test Thoroughly

  • Sign up flow
  • Chat functionality
  • Subscription purchases (sandbox)
  • Settings and preferences
  • Performance on various devices

App Store Submission

Run App Store 4.3 hardening before this step. It covers the binary strings audit, branding map, dead-code removal, and screenshot ordering. The most common rejection reason for boilerplate-based apps is undifferentiated product, not a metadata typo.

1. Prepare Metadata

In App Store Connect:

2. Create Screenshots

Required sizes:
  • 6.7” (iPhone 15 Pro Max): 1290 × 2796
  • 6.5” (older Pro Max): 1284 × 2778
  • 5.5” (older Plus): 1242 × 2208
  • 12.9” iPad Pro: 2048 × 2732 (if supporting iPad)
Tips:
  • 4-10 screenshots per size
  • Show key features
  • Add text overlays
  • First screenshot most important

3. Write Description

Template:

4. Configure App Privacy

Answer privacy questionnaire: Data collected:
  • Contact Info: Email (for account)
  • Identifiers: User ID (for backend)
  • Usage Data: App interactions (if analytics)
  • User Content: Chat messages
For each: Linked to identity, Used for app functionality

5. Submit for Review

Review time: 24-48 hours typically

Production Configuration

Backend Setup

  1. Use production Supabase project
  2. Verify Edge Function deployed (supabase functions deploy ai)
  3. Set production OpenRouter key (supabase secrets set OPENROUTER_API_KEY=...)
  4. Monitor API usage in Supabase dashboard

Final Verification

To turn Crashlytics on in production, set the CRASHLYTICS_ENABLED=true environment variable in your Release scheme (and follow the Crashlytics setup guide). Then verify your production secrets:

Post-Launch

Monitor

  • Crashlytics dashboard (if enabled)
  • App Store Connect analytics
  • RevenueCat subscription metrics
  • Supabase API usage
  • User reviews and ratings

Respond

  • Reply to user reviews
  • Fix critical bugs immediately
  • Plan feature updates
  • Gather user feedback

Update Regularly

Recommended cadence:
  • Bug fixes: As needed (1-3 days)
  • Minor updates: Every 2-4 weeks
  • Major features: Every 2-3 months

Complete Guide

View Complete Launch Checklist

Find complete deployment checklist in your project

Testing Guide

Run full test suite

Supabase Setup

Production backend

RevenueCat Setup

Production subscriptions

Building Guide

Complete customization

Troubleshooting

  • Clean build (⌘⇧K)
  • Check signing certificates
  • Verify provisioning profiles
  • Update Xcode if needed
  • Read rejection carefully
  • Fix specific issues mentioned
  • Update metadata if needed
  • Resubmit with explanation
  • If the rejection cites Guideline 4.3 or 4.2.6, see the 4.3 hardening recovery steps
  • Check Crashlytics logs
  • Reproduce locally
  • Fix and submit hotfix
  • Expedited review if critical