IOS 10 - Redirect to 3rd party apps after you take a picture not working as expected


#1

My app is being closed when I try to redirect to 3rd party apps after I take a picture.

whenever I call other app using this sample code:

  navigator.camera.getPicture(function (srcUri) {
    supersonic.app.openURL("youtube://");
  }, function(error) {
    console.log(error);
  }, {
    quality: 25,
    destinationType: navigator.camera.DestinationType.FILE_URI,
    sourceType: navigator.camera.PictureSourceType.CAMERA
  });

Youtube is open but my app gets close and re-open in background. It’s like my app loses its state.


Cannot install cordova plugin - Build fail
#2

Cordova is not very friendly with triggering stuff directly in the callback. What happens if you wrap the openURL method into a 0-second setTimeout? I assume from the topic that this is on iOS 10, not Android? And did this work on iOS 9 fine?


#3

Yes, it is only on iOS10, Android and iOS 9 works fine. We will try your advice.
Thanks.


#4

We already tried setting a timeout in the callback function but doesn’t work. IOS 9 and Android are working fine. Sadly IOS 10 is the problem