ribesg
07/26/2024, 11:34 AMstartBugsnag
, which takes an empty co.touchlab.crashkios.bugsnag.BugsnagConfiguration
and seems to start its own co.touchlab.crashkios.bugsnag.Bugsnag
instance.
Meanwhile, following the documentation, I already have a proper call to cocoapods.Bugsnag.startWithConfiguration
with a correct configuration of type cocoapods.BugsnagConfiguration
which can actually contain configuration values.
Is this supposed to work that way? Calling startBugsnag
with a dummy config? This is weirdkpgalligan
07/26/2024, 12:11 PMMeanwhile, following the documentationWhich documentation?
ribesg
07/26/2024, 12:14 PMkpgalligan
07/26/2024, 12:25 PMMeanwhile, following the documentation, I already have a proper call toI meant which docs for a "proper call" with the cocoapods cinterop. Anyway, I think I get it.cocoapods.Bugsnag.startWithConfiguration
On iOS, there's a few more things to do at startup for Bugsnag to work. These are all wrapped in a helper functionIt's a helper function. Internally it does this:.startBugsnag(config: BugsnagConfiguration)
public fun startBugsnag(config: BugsnagConfiguration){
configureBugsnag(config)
Bugsnag.startWithConfiguration(config)
setBugsnagUnhandledExceptionHook()
enableBugsnag()
}
For context, that's what's happening under the hood.
The documentation says to callFrom the docs:, which takes an emptystartBugsnag
co.touchlab.crashkios.bugsnag.BugsnagConfiguration
If you don't need to do any other config for Bugsnag you can create an empty config"If" is the key there. You can use a non-empty one.
and seems to start its ownIt does not. It calls the static instance.instanceco.touchlab.crashkios.bugsnag.Bugsnag
kpgalligan
07/26/2024, 12:28 PMstartWithConfiguration
call, just copy/paste the steps in the helper function.
configureBugsnag(yourconfig)
Bugsnag.startWithConfiguration(yourconfig)
setBugsnagUnhandledExceptionHook()
enableBugsnag()
If you're doing your own cinterop with cocoapods, you'll have to cast it (I think, just got up), but they both delegate to ObjC instances. Those should match fine below the Kotlin layer.kpgalligan
07/26/2024, 12:29 PMBugsnag.startWithConfiguration
from CrashKiOS's cinteropkpgalligan
07/26/2024, 12:30 PMenableBugsnag()
used to do something useful, but test exe's are dynamic now, so it's pointless.ribesg
07/26/2024, 1:00 PMco.touchlab.crashkios.bugsnag.BugsnagConfiguration
is an empty class, but I do need to configure stuff so I can't use it.
If you can cast back and forth between cocoapods.Bugsnag*
and co.touchlab.crashkios.bugsnag.Bugsnag*
, then I should be able to make it workkpgalligan
07/26/2024, 1:10 PMLike most open source, the design was a bit too informed by our use case. We generally pass the config in from Swift.is an empty classco.touchlab.crashkios.bugsnag.BugsnagConfiguration
kpgalligan
07/26/2024, 3:32 PM