Initial commit: nightly iOS app + Supabase backend
iOS SwiftUI app with Supabase auth/realtime, Node.js backend, Docker/Supabase self-hosted infrastructure, and APNs scheduler. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import Foundation
|
||||
|
||||
/// Konfiguration aus dem Xcode Build-System (xcconfig / Info.plist).
|
||||
///
|
||||
/// Setup:
|
||||
/// 1. Datei `Config.xcconfig` im Projektverzeichnis anlegen (nicht committen!):
|
||||
/// SUPABASE_URL = https://api.xxx.dk0.dev
|
||||
/// SUPABASE_ANON_KEY = eyJhbGci...
|
||||
///
|
||||
/// 2. In Xcode: Project → Info → Configurations → Debug & Release auf Config.xcconfig setzen
|
||||
/// 3. In Info.plist eintragen:
|
||||
/// SUPABASE_URL → $(SUPABASE_URL)
|
||||
/// SUPABASE_ANON_KEY → $(SUPABASE_ANON_KEY)
|
||||
|
||||
enum Config {
|
||||
static let supabaseURL: URL = {
|
||||
guard
|
||||
let raw = Bundle.main.object(forInfoDictionaryKey: "SUPABASE_URL") as? String,
|
||||
!raw.isEmpty,
|
||||
let url = URL(string: raw)
|
||||
else {
|
||||
// Fallback für Entwicklung — ersetze mit deiner URL
|
||||
return URL(string: "https://api.xxx.dk0.dev")!
|
||||
}
|
||||
return url
|
||||
}()
|
||||
|
||||
static let supabaseAnonKey: String = {
|
||||
let key = Bundle.main.object(forInfoDictionaryKey: "SUPABASE_ANON_KEY") as? String ?? ""
|
||||
if key.isEmpty {
|
||||
print("⚠️ SUPABASE_ANON_KEY nicht gesetzt — Config.xcconfig prüfen")
|
||||
}
|
||||
return key
|
||||
}()
|
||||
}
|
||||
Reference in New Issue
Block a user