changes to main-ios to allow image saving from ios native code