Closed riccardoch closed 3 years ago
Is that callback on the main queue?
Also, have you tried 9.0.2?
@wtmoose I've tried both 9.0.1 and 9.0.2. The callback doesn't need to be on a different thread, anyway if I include it on another thread the alert is not shown.
I was asking if the callback is on the main queue or not. I can't tell from looking at your code.
It's on main queue 😉
I've tried with a basic message, without custom configurations, but nothing changed. The Biometry check is done after a button action (Touch Inside).
I have similar issue but when app return to active state. I handle Internet reachability states and show bar when Internet is not reachable. And when disable it via iOS flight mode bar is not showed. I researched it a bit and found that issue is here: https://github.com/SwiftKickMobile/SwiftMessages/blob/6925ef9f8f19ce7fef2bf3fbe4dcf5fc99d471e0/SwiftMessages/UIWindow%2BExtensions.swift#L16
Because window scene at moment when reachability status changed is not in active state (like in original case with iOS biometric) bar is not showed. I suggest to update condition or rollback to old implementation.
@vg-identance Yeah, I don't know why that line is there, but it doesn't belong. I'll remove it
Exactly same issue happens after opening app via universal link. In my case a universal link is handled, then REST API called, and alert is shown on fail. It looks like on current devices all these things happen really fast. I have temporarily work-arounded the issue by giving a 1 sec delay to the message without having to modify the library.
Also I have double-checked that commenting out .filter { $0.activationState == .foregroundActive }
fixes the issue indeed.
怎么解决?我在首次启动的时候alert,同时弹出IDFA权限请求弹框,SwiftMessages没有弹出,之后再次alert也没有弹框
@riccardoch I'm sorry for taking so long to look at this – I was overloaded at work. The fix was a little bit more involved than commenting out .filter { $0.activationState == .foregroundActive }
, but along the same lines. If you'd like to confirm, the fixes are on branch work/9.0.3
.
@wtmoose I've tried the branch and everything work as expected. Thanks for the great work!
Released 9.0.3
From version 9.0.1 my app can't display alert after Biometry check. This issue doesn't occur with older versions. If I try to show the alert after 1 sec (or more) using
DispatchQueue.main.asynAfter
the alert appears correctly.Here the code that doesn't work: