https://kotlinlang.org logo
Title
a

aleksey.tomin

10/03/2020, 6:04 AM
I try to use schedule on iOS by
BGTaskScheduler.sharedScheduler.registerForTaskWithIdentifier("My.ID", null, ::handleBackgroundRefresh)
Ant I have error
Null can not be a value of a non-null type dispatch_queue_t? /* = NSObject? */
NSObject?
is a non-null type? PS: How can I starts something “every 30 seconds” on iOS?
a

Artyom Degtyarev [JB]

10/05/2020, 9:18 AM
Hi! This seems like a bug reported here already. Problem is related to the common-iOS source set. The root cause is described in https://youtrack.jetbrains.com/issue/KT-42095, so you can follow it for updates, and temporary change the project’s source sets hierarchy.
a

aleksey.tomin

10/05/2020, 11:17 AM
The code in
ios
section. And
gradle build
has found no problems.
iosMain
🙂 I’ve added the comment to the first ticket
👍 1