I want to change the text of "your usage message" in alert of getPicture - ionic ios

109 views Asked by At

enter image description here

I want to change the text of "your usage message" as shown in the image. I'm using ionic and it only happens to iOS, the functions of getPicture con CameraOptions and ImagePickerOptions

my code:

sel_photo(){
let options:ImagePickerOptions =  {
  quality: 70,
  outputType: 1,
  maximumImagesCount: 1,
  width: 600,
  height: 600,
}

this.imagePicker.getPictures(options).then((results) => {
  for (var i = 0; i < results.length; i++) {
    this.imagenPreview = 'data:image/jpeg;base64,' + results[i];
    this.imagen64 = results[i];
  }
}, (err) => {
  console.log('Error al seleccionar foto', JSON.stringify(err))
});

}

1

There are 1 answers

0
Gabriel Bitencourt On

Go to your config.xml file in the root directory of your ionic project, the search for the tag:

<plugin name="cordova-plugin-telerik-imagepicker" ...>
    <variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="your usage message" />
</plugin>

Then change the value to whatever you want it to. If the <variable> tag is not present, just add it inside the <plugin> tag.

Make sure you restart ionic serve so changes can take effect.