-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Reverts "Timing: Fixes timer when app get into background (#24649)" #27073
Conversation
…4649)" Co-Authored-By: �HackerMeo <minhtc@users.noreply.github.com>
Duplicate of #27065 |
Not really. The #27065 is towards a 0.61-stable branch (so we can have easier time cherry-picking). Here, it's something that should be imported if we revert from master. |
Thanks for the explanation, I didn't realize they were meant for different branches, my mistake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was successfully merged by @radko93 in e1d03b4. When will my fix make it into a release? | Upcoming Releases |
Sorry to bring this up, does this bug only affect RN 0.61? I'm seeing lots of strange "no background task exists with identifier ..." logs with RN 0.60 and iOS 13.x. These logs were not here before. I wonder if these background timers have anything to do with it. |
Hi, I'm from #25083. Update: Maybe just adding it should work in RN0.62: - (void)applicationDidEnterBackground:(UIApplication *)application
{
UIBackgroundTaskIdentifier taskId = [application beginBackgroundTaskWithExpirationHandler:nil];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// do nothing for 4.7 seconds
[NSThread sleepForTimeInterval:4.7f];
[application endBackgroundTask:taskId];
});
} |
Summary
This PR reverts commit 3382984 that is causing #26696 #26995.
Similar PR for 0.61. branch #27065
Changelog
[iOS] [Fixed] - Fix apps crashing on iOS 13.x when running timer in the background
Test Plan
Try this snippet on iOS 13.1/13.2, the app should not crash anymore