Post

Replies

Boosts

Views

Activity

Can't Simulate BgTaskScheduler to run the tasks in LLDB
`   func submitBackgroundTasks() {    // Declared at the "Permitted background task scheduler identifiers" in info.plist    let backgroundAppRefreshTaskSchedulerIdentifier = "com.FeedX.backgroundAlerts"    let timeDelay = 10.0    do {     let backgroundAppRefreshTaskRequest = BGAppRefreshTaskRequest(identifier: backgroundAppRefreshTaskSchedulerIdentifier)     backgroundAppRefreshTaskRequest.earliestBeginDate = Date(timeIntervalSinceNow: timeDelay)     try BGTaskScheduler.shared.submit(backgroundAppRefreshTaskRequest)     print("Submitted task request")    } catch {     print("Failed to submit BGTask")    }   } I am able to submit the task and hit the breakpoint but in the LLDB i try to simulate the task using the command e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateExpirationForTaskWithIdentifier:@"com.FeedX.backgroundAlerts"] But i get the following error : error: Error [IRForTarget]: Rewriting an Objective-C constant string requires CFStringCreateWithBytes Any idea on how to solve this or run the task using a different way? Thanks.
1
0
2.4k
Jan ’23
Can't Simulate BgTaskScheduler to run the tasks in LLDB
`   func submitBackgroundTasks() {    // Declared at the "Permitted background task scheduler identifiers" in info.plist    let backgroundAppRefreshTaskSchedulerIdentifier = "com.FeedX.backgroundAlerts"    let timeDelay = 10.0    do {     let backgroundAppRefreshTaskRequest = BGAppRefreshTaskRequest(identifier: backgroundAppRefreshTaskSchedulerIdentifier)     backgroundAppRefreshTaskRequest.earliestBeginDate = Date(timeIntervalSinceNow: timeDelay)     try BGTaskScheduler.shared.submit(backgroundAppRefreshTaskRequest)     print("Submitted task request")    } catch {     print("Failed to submit BGTask")    }   } I am able to submit the task and hit the breakpoint but in the LLDB i try to simulate the task using the command e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateExpirationForTaskWithIdentifier:@"com.FeedX.backgroundAlerts"] But i get the following error : error: Error [IRForTarget]: Rewriting an Objective-C constant string requires CFStringCreateWithBytes Any idea on how to solve this or run the task using a different way? Thanks.
Replies
1
Boosts
0
Views
2.4k
Activity
Jan ’23