toImage doesn't work in iPhone

Hello, i’m exporting the plot as base64 PNG and using it in tag, the problem is that whenever i use toImage in mobile; it only saves black image but it’s working when i do the exact same things with exact plot in Windows. It used to work before, does anybody also encounter the same problem?

Sadly got no help, i’ve tried everything i could and i was able to fix it but maybe not in the best way.
I had to use the toImage function multiple times, like nested promise functions, and 2nd function gave me the right image.