Skip to content
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

Why didn't the background tasks created by the SDK actively stop when they return to the foreground? IOS #367

Open
keepDeveloper opened this issue Sep 14, 2024 · 5 comments
Assignees
Labels
bug Something isn't working stale This isue has been inactive

Comments

@keepDeveloper
Copy link

keepDeveloper commented Sep 14, 2024

MAX SDK Version

'AppLovinSDK', '= 12.1.0'

Device/Platform Info

iOS

Current Behavior

Too many background tasks are created causing crash
image
截屏2024-09-14 17 35 02

Expected Behavior

SDK reduces background task creation and returns to the foreground to cancel background tasks

How to Reproduce

Switch between app front and back

@keepDeveloper keepDeveloper added the bug Something isn't working label Sep 14, 2024
@keepDeveloper
Copy link
Author

keepDeveloper commented Sep 14, 2024

Background Task 551 ("Called by xxx, from -[ALFileExpirationManager appDidEnterBackground:]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(:) for your task in a timely manner to avoid this.
Background Task 579 ("Called by xxx, from -[ALFileExpirationManager appDidEnterBackground:]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(
:) for your task in a timely manner to avoid this.
Background Task 611 ("Called by xxx, from -[ALFileExpirationManager appDidEnterBackground:]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.

@NanaAmoah NanaAmoah self-assigned this Sep 17, 2024
@keepDeveloper
Copy link
Author

@NanaAmoah When do you decide to resolve this problem?

@NanaAmoah
Copy link
Contributor

Hi @keepDeveloper, we're currently looking into this and I will share any updates.

@NanaAmoah
Copy link
Contributor

Hi @keepDeveloper I confirmed that we call UIApplication.endBackgroundTask() when the app is in the foreground. The stack trace you shared shows that this issue is happening on the main thread- is there are reason you believe these background tasks are causing this issue? I also tested backgrounding and foregrounding our app several times and was not able to reproduce issues with FPS/ frame rate drops.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This isue has been inactive label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale This isue has been inactive
Projects
None yet
Development

No branches or pull requests

2 participants