Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5714] Ti.Media.saveToPhotoGallery crash on iOS 11.3

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2018-04-26T15:55:38.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterThomas Lemaitre
AssigneeShak Hossain
Created2018-04-26T15:31:21.000+0000
Updated2018-04-26T15:55:39.000+0000

Description

When calling Ti.Media.saveToPhotoGallery, the app crash on iOS 11.3 (the same code works on iOS 10.3). //$.photo in an imageview var savePhoto = $.photo.toImage(); Ti.Media.saveToPhotoGallery(savePhoto, { success: function(e) { Titanium.UI.createAlertDialog({ title:'Confirmation', message:'Photo sauvegardé avec succès' }).show(); }, error: function(e) { Titanium.UI.createAlertDialog({ title:'Error saving', message:e.error }).show(); } });

Comments

  1. Hans Knöchel 2018-04-26

    iOS 11.x requires NSPhotoLibraryAddUsageDescription when saving to the gallery, which is different to NSPhotoLibraryUsageDescription that it for reading from the library. It is documented in the iOS 11 change log and should be added to the tiapp.xml.

JSON Source