Open yusuftor opened 5 years ago
Also facing same issue. I believe the crash actually happens in assertIsPrepared()
because we've already ensured that all dismiss calls occur on the main thread. And for testing I could reproduce it by executing 2 dismiss calls in a row.
I'm using the following solution:
add system("sed -i '' -e 's/fileprivate var isPrepared/public fileprivate(set) var isPrepared/' Pods/BulletinBoard/Sources/BLTNItemManager.swift")
to post_install
hook in the Podfile
before calling dismiss, check that manager.isPrepared == true
If I call
bulletinManager.dismissBulletin(animated: true)
when the bulletin has already been dismissed, it crashes sayingBLTNItemManager must only be used from the main thread.
If thedismissBulletin()
function is called immediately after the manager has been dismissed,bulletinManager.isShowingBulletin
is stilltrue
. There needs to be a check like "if the manager is no longer presenting, or is in the middle of dismissing, ignore the call to dismiss".I'm using the latest version of BulletinBoard