iOS - cannot open an app on iOS browsers. Memory limit

Hi. I have an app

This app recently was working properly on all browsers. Recently this changed and my apps started crashing on iOS, to be honest I am not an iPhone user so I am not quite sure what changed recently regarding the iOS system.

After inspection, this is the message I get when I try to open the app

“Total canvas memory use exceeds the maximum limit (256mb)”
“WebGL: Invalid Value: texImage2d: no canvas”

Couple of my apps stopped working on the IOS recently. And they worked properly before. Now, I somewhat understand what is going on, and I will try to optimize my assets further to see if it will help, but I am just not sure why it worked before and now it doesn’t with literally nothing being changed regarding the project files.

Any suggestions?

I didn’t see any amount of texture that would exceed 256mb total. Do you create a lot of render targets? how many vertices/faces in your geometry?

1 Like

I was able to get it to work on an iphone 12 by disabling WebGL via Metal in Safari’s experimental features. I’ve had some problems with iOS devices, but it’s still not a viable solution.

I also think you should review the optimization of the project assets
You can use GLTFReport to optimize textures or compress the GLB model (Draco or MeshOpt), it’s very easy to use.

Try to reduce the size of the textures to 512px, especially the lightmaps
It also reduces the images of the icons, to 128px I think it would be correct.

Another important issue is, are you loading all the models when you start the app?
The ideal would be to load the main model and load the other models as you use them and download memory.

Try using AssetContainer, it’s very comfortable and allows you to quickly add or remove models

Finally, have you tried updating to a more recent version of Babylon? I have seen that you are using 4.2

1 Like

if you’re having a problem on ios with the textures I think ios devices can’t render textures above 4k.

1 Like