iOS client for Grain grain.social
ios photography atproto
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

more logs

authored by

Hima Aramona and committed by
Chad Miller
a3a17707 9b4d1750

+14 -1
+9
Grain/AppDelegate.swift
··· 1 + import os 1 2 import UIKit 2 3 import UserNotifications 4 + 5 + private let appDelegateSignposter = OSSignposter(subsystem: "social.grain.grain", category: "AppLaunch") 3 6 4 7 /// AppDelegate for handling push notification registration and tap callbacks. 5 8 @MainActor ··· 7 10 var pushManager: PushManager? 8 11 var onNotificationTap: ((DeepLink) -> Void)? 9 12 13 + override init() { 14 + super.init() 15 + appDelegateSignposter.emitEvent("AppDelegateInit") 16 + } 17 + 10 18 func application( 11 19 _: UIApplication, 12 20 didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil 13 21 ) -> Bool { 22 + appDelegateSignposter.emitEvent("AppDelegateDidFinishLaunching") 14 23 UNUserNotificationCenter.current().delegate = self 15 24 return true 16 25 }
+5 -1
Grain/GrainApp.swift
··· 8 8 @main 9 9 struct GrainApp: App { 10 10 init() { 11 + appSignposter.emitEvent("GrainAppInitBegin") 11 12 // Defer Nuke DataCache setup off the main-thread init path — no images 12 13 // load during the ~800ms before MainTabView.task fires, so this is safe. 13 14 Task.detached(priority: .userInitiated) { ··· 22 23 appSignposter.endInterval("NukePipelineSetup", state) 23 24 appLogger.debug("[NukePipelineSetup] end") 24 25 } 26 + appSignposter.emitEvent("GrainAppInitEnd") 25 27 } 26 28 27 29 @UIApplicationDelegateAdaptor private var appDelegate: AppDelegate ··· 35 37 var body: some Scene { 36 38 WindowGroup { 37 39 let _ = appSignposter.emitEvent("WindowGroupBodyBegin") 40 + let isAuthed = authManager.isAuthenticated 41 + let _ = appSignposter.emitEvent("AuthGateResolved") 38 42 Group { 39 - if authManager.isAuthenticated { 43 + if isAuthed { 40 44 MainTabView(pendingDeepLink: $pendingDeepLink) 41 45 .environment(authManager) 42 46 .environment(pushManager)