You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have tried to use removeOnBreadcrumbBlock from swift and find out that is not deleting the block.
Here is the code examples which we have tried:
// passing as function like mentioned in the documentation
func cb(breadcrumb: BugsnagBreadcrumb) -> Bool { /* ... */ }
Bugsnag.addOnBreadcrumb(block: cb)
// ...
Bugsnag.removeOnBreadcrumb(block: cb)
// passing as @convention(block
let bl:@convention(block) (_ breadcrumb: BugsnagBreadcrumb) -> Bool =
Bugsnag.addOnBreadcrumb(block: cb)
// ...
Bugsnag.removeOnBreadcrumb(block: cb)
and some other variations , we have tried to remove copy call in the addOnBreadcrumb and nothing helped.
Then in the new project we have tried to reproduce the issue, we have found out that when we are changing addOnBreadcrumb/removeOnBreadcrumb to + (void)removeOnBreadcrumbBlock:(id)block,+ (void)addOnBreadcrumbBlock:(id)block (type is id) it started working. Then we have did a workaround by declaring an extension on the Bugsnag class:
Hi Bugsnag team,
We have tried to use
removeOnBreadcrumbBlock
from swift and find out that is not deleting the block.Here is the code examples which we have tried:
and some other variations , we have tried to remove
copy
call in theaddOnBreadcrumb
and nothing helped.Then in the new project we have tried to reproduce the issue, we have found out that when we are changing
addOnBreadcrumb/removeOnBreadcrumb
to+ (void)removeOnBreadcrumbBlock:(id)block
,+ (void)addOnBreadcrumbBlock:(id)block
(type isid
) it started working. Then we have did a workaround by declaring an extension on theBugsnag
class:when we call `addOnBreadcrumbAnyTypeBlock/removeOnBreadcrumbAnyTypeBlock from swift it correctly adds/removes.
The text was updated successfully, but these errors were encountered: