Post

Replies

Boosts

Views

Activity

Reply to Swift 6 actor error in didReceiveRemoteNotification of UIApplicationDelegate
@zoha131 Please add @MainActor before the AppDelegate class: @MainActor class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { UNUserNotificationCenter.current().delegate = self return true } func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) async -> UIBackgroundFetchResult { return .noData } }
Aug ’24
Reply to invalid mode 'kCFRunLoopCommonModes'
One way to silence this warning is to: Go into your project's "Edit Scheme..." Select the Run (Debug) option, in the left-hand sidebar. Add a new Environment Variable by clicking on the "+" icon. Enter "OS_ACTIVITY_MODE" (without the quotes) for the name. Enter "disable" (without the quotes) into the value field. Click "Close" and then build and run your app. Please note that this may hide other important info in the console. But, your print messages will still appear, as expected.
Feb ’23