Did my answer help you at all
zoha131? I'm just curious.
Thanks,
Mark
Post
Replies
Boosts
Views
Activity
@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
}
}
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.