-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when calling fire() after creating timer #29
Comments
could you give more info? OS version, crash log? |
Crashed: com.apple.main-thread Crashed: com.apple.main-thread This is happening on every device, every OS I tried (iOS, iPhone) |
Looks like the CFTimer → NSTimer bridging is lacking, and a bridged timer doesn't actually have a It is an edge case, but still worth reverting to the old method of initializing timers... @BenchR267 Would you mind filing the bug with Apple (bugreport.apple.com), so that it's also fixed for everyone? |
Oh yeah, sorry, forgot to answer. I'll create a bugticket at Apple. |
@radex Will you revert to the old way anytime soon? Asking because you said you would, but there have been no changes to that. |
I intend to… The trouble is that if I do that, I lose compatibility with SwiftPM (old method requires ObjC runtime)... Perhaps a conditional implementation (Using either |
Is there a workaround for this? Its crashing my app as well. |
@scisci we are using an older version of SwiftyTimer which doesn't have the issues. |
I also encountered this issue, The context is if the user is about to switch views that if a certain timer that calls a function to hide certain messages has not done so when its about to switch, it fires then invalidates the timer. So instead of
MTq is a legacy obj-c library, which is just syntax sugar for GCD that could easily be GCD or any other GCD-esque library |
This just got me as well, a bummer! |
The following code worked with 1.3.0 but crashes with 1.4.0:
The internal refactoring of not using NSTimer initializers might be the problem.
The text was updated successfully, but these errors were encountered: