Closed JosephCarrington closed 9 months ago
Were you able to find a solution to this error? It causes my app to crash every time it has to do something memory intensive.
I am impacted too on my AR app
add
- (void) applicationDidReceiveMemoryWarning:(UIApplication *)application {}
in file UnityAppController.mm
to fix this
I just noticed the following in the Unity changelogs
iOS: Bring back the applicationDidReceiveMemoryWarning: to UnityAppController. (UUM-55367)
This is noted in versions
I can't find when they removed it, but it looks like they fixed it themself.
[Update] I also found
iOS: Fixed low memory usage event not triggered when using Unity as a library. (UUM-20838)
Fixed in 2021.3.28f1, 2022.3.2f1, 2023.1.0f1, 2023.2.0a17
So updating Unity seems your best bet.
I just noticed the following in the Unity changelogs
iOS: Bring back the applicationDidReceiveMemoryWarning: to UnityAppController. (UUM-55367)
This is noted in versions
I can't find when they removed it, but it looks like they fixed it themself.
Good to know that they brought it to both 2021 + 2022.
For reference, this is the function that Unity adds in 2021.3.33, which matches what @CodeEagle mentioned earlier.
- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application
{
// We handle it by subscribing for notification, this one is only a placeholder for stuff like forwarding in UaaL setups
}
Describe the bug If the app receives a memory warning while running a Unity view, it crashes.
To Reproduce Steps to reproduce the behavior:
Expected behavior applicationDidReceiveMemoryWarning should have a handler of some kind that actually exists.
Screenshots
Unity (please complete the following information):
Smartphone (please complete the following information):