AXPhotoViewer icon indicating copy to clipboard operation
AXPhotoViewer copied to clipboard

Freezes on action button

Open abdullahumer opened this issue 5 years ago • 4 comments

Hi

My app is freezing when tapped on the action and if save is selected from the action sheet.

The dismiss button and swipe also stops working.

abdullahumer avatar Nov 06 '19 12:11 abdullahumer

Same here. I've debug this issue, here is some findings: In iOS 13, dismiss method is called after save image action, which caused the problem. In iOS 12, everything works fine.

kyoji2 avatar Nov 07 '19 05:11 kyoji2

Thanks, it works! The app is not freezing now.

I guess the default behaviour was supposed to dismiss the viewController after the save image action is selected but for some reasons, its not working in iOS 13.

My quick guess is that the dismiss should be done on completion of save image operation.

For now, your solution is the best. The users will have to manually close the view by swipe of by using the close button.

abdullahumer avatar Nov 07 '19 09:11 abdullahumer

After testing more, I found that the following actions are also causing the same issue:

  • Add to shared Album
  • Save to Files

In case of Save to Files, it takes too long. And if I tap the cancel, it does not close the activityViewController.

And I see an error log: [ShareSheet] cancelled request - error: The operation was cancelled.

abdullahumer avatar Nov 07 '19 10:11 abdullahumer

Alright, the cause of the above issues was your work around.

But this code fixes the issue:

        if self.presentedViewController != nil {
        //            super.dismiss(animated: flag, completion: completion)
            self.presentedViewController?.dismiss(animated: flag, completion: {
                completion?()
            })
            return
        }

abdullahumer avatar Nov 07 '19 10:11 abdullahumer