Environment Configuration
All app configuration is centralized in Core/Environment.swift via the AppConfig enum.
AppConfig Properties
API Configuration
| Property | Type | Default | Description |
|---|---|---|---|
apiBaseURL | String | http://localhost:3000/api (debug) / https://staccato-coffee.vercel.app/api (release) | Base URL for API calls |
Supabase Configuration
| Property | Type | Env Override | Description |
|---|---|---|---|
supabaseURL | String | SUPABASE_URL | Supabase project URL |
supabaseAnonKey | String | SUPABASE_ANON_KEY | Supabase anonymous key |
Square Configuration
| Property | Type | Env Override | Description |
|---|---|---|---|
squareApplicationId | String | SQUARE_APPLICATION_ID | Square app ID (sandbox in debug) |
squareLocationId | String | SQUARE_LOCATION_ID | Square location ID |
App Constants
| Property | Type | Value | Description |
|---|---|---|---|
taxRate | Double | 0.085 | 8.5% tax rate |
currencyCode | String | "USD" | Currency |
countryCode | String | "US" | Country |
Store Information
| Property | Value |
|---|---|
storeName | ”Staccato Coffee House” |
storeTagline | ”Books · Coffee · Vinyls” |
storeAddress | ”321 N Main Street” |
storeCity | ”McAllen, TX 78501” |
storePhone | ”(956) 598-4151” |
storeHours | ”Mon-Sun: 7AM - 9PM” |
storeInstagram | https://www.instagram.com/staccatocoffeehouse/ |
storeTikTok | https://www.tiktok.com/@staccatocoffeehouse |
storeWebsiteURL | https://staccatocoffeehouse.com |
storeOrderOnlineURL | https://staccatocoffeehouse.square.site |
Environment Variable Overrides
The app reads environment variables at runtime via ProcessInfo.processInfo.environment. This allows setting values in Xcode schemes without modifying source code:
static var supabaseURL: String {
ProcessInfo.processInfo.environment["SUPABASE_URL"]
?? "https://pzwfeskyqlsxvaietzrn.supabase.co"
}To set in Xcode: Product → Scheme → Edit Scheme → Run → Arguments → Environment Variables.
Debug vs Release
Square uses sandbox credentials in debug mode:
static var squareApplicationId: String {
#if DEBUG
return ProcessInfo.processInfo.environment["SQUARE_APPLICATION_ID"]
?? "sandbox-sq0idb-DEMO"
#else
return ProcessInfo.processInfo.environment["SQUARE_APPLICATION_ID"]
?? "your-production-app-id"
#endif
}Info.plist
Key configuration in Info.plist:
- Bundle ID:
com.staccato.coffee - URL Schemes:
staccatocoffee(for OAuth callback:staccatocoffee://auth/callback) - NSAppTransportSecurity: Localhost exception for development
Entitlements
StaccatoCoffee.entitlements:
- Sign In with Apple
- Apple Pay:
merchant.com.staccato.coffee