Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 11.4.1 app crash #171

Open
1 task done
ppetree opened this issue May 2, 2020 · 0 comments
Open
1 task done

iOS 11.4.1 app crash #171

ppetree opened this issue May 2, 2020 · 0 comments

Comments

@ppetree
Copy link

ppetree commented May 2, 2020

Bug Report

When returning from a captureVideo or capturePhoto well... it never returns. I get a black screen and then nothing and the system returns to the launch screen.

Problem

App is crashing

What is expected to happen?

On iOS 12> this works perfectly. I can take a photo or video and it returns to the app with no issues.

What does actually happen?

On iOS 11.4.1 (we don't have an iOS 10 device and we don't support iOS 9), we can take a photo or capture a video and on first try the system does prompt for permission. The photo/video is captured, we accept it and then the screen goes blank and we're taken back to the launch screen. It never returns to our app.

Information

We're using 3.0.3 of the plugin and building via PGB. We copied your .plist permission entries verbatum. If we invoke the capturePhoto or captureVideo and cancel, it returns to the app properly. It's when we accept the media that the app crashes.

Command or Code

    navigator.device.capture.captureImage(function(mediaFiles) {
      var i;
      for (i = 0; i < mediaFiles.length; i++) {
         self.objMedia.path = mediaFiles[i].fullPath;
         self.objMedia.url = mediaFiles[i].localURL; 
         console.log("capturePhoto callback");
         console.log(mediaFiles);
      }   
    }, self.mediaOnError, options);

Plus this:

// pendingcaptureresult is fired if the capture call is successful
document.addEventListener('pendingcaptureresult', mediaOnResume);

// pendingcaptureerror is fired if the capture call is unsuccessful
document.addEventListener('pendingcaptureerror', mediaOnResumeErr);

function mediaOnResume(mediaFiles)
{
  console.log("mediaOnResume");
  console.log(mediaFiles);
}

Environment, Platform, Device

iPhone 6+ running iOS 11.4.1, 128gb with 107.44gb available

Version information

What are relevant versions you are using?
PGB CLI 9.0.0 (5.0.1 for iOS)
iOS 11.4.1
cordova-plugin-media-capture 3.0.3

Checklist

  • [x ] I searched for existing GitHub issues
  • [o] I updated all Cordova tooling to most recent version [as best I can]
  • I included all the necessary information above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant