image.save_png() does not work on IOS.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Joakim Wennergren

Hello godot Q&A,

Im trying to save a png in my game from a HTTPRequest and then load it from an another scene. It works fine in the editor but not on my iphone. What gives?

func _on_HTTPRequest_request_completed(result, response_code, headers, body):
  var image = Image.new()
  image.load_png_from_buffer(body)
  image.save_png()
  pass 

and then in my other scene:

func _ready():
self.set_texture(load("res://cache/spritesheet.png"));
pass