Created
March 4, 2026 12:46
-
-
Save jacobsapps/6d383049ea2bf8276880946674aa1928 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @main | |
| struct FakeTwitterApp: App { | |
| @UIApplicationDelegateAdaptor(FakeTwitterAppDelegate.self) private var appDelegate | |
| private let modelContainer: ModelContainer | |
| private let level4Engine: UploadJobEngine | |
| init() { | |
| let schema = Schema([PersistedUploadJob.self]) | |
| let configuration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) | |
| do { | |
| modelContainer = try ModelContainer(for: schema, configurations: [configuration]) | |
| } catch { | |
| fatalError("Failed to create SwiftData container: \(error)") | |
| } | |
| let engine = UploadJobEngine(container: modelContainer, baseURL: baseURL) | |
| Task { | |
| await engine.recoverAndProcessOutstandingJobs() | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment