1

I am using main thread to show share options in iOS.

[url] is my PDF data. Every share option is working fine, except when user clicks on application which resign current application and go to third party(selected) application. For eg: If user clicks on share button, then google chrome; chrome application will open. And when user comes back to original application, user is not able to tap other options of UIActivityViewController. Why is this happening. On console, I am getting below warning (no crash):

[ShareSheet] Trying to perform <UISocialActivity: 0x282b64a50> activityType:com.apple.mobilenotes.SharingExtension activityTitle:UISocialActivity but there is already an activity performing:<SHSheetActivityPerformer: 0x283f427d0>

let ac = UIActivityViewController(activityItems: [url], applicationActivities: nil)
DispatchQueue.main.async {
   self.present(ac, animated: true)
}
pkc456
  • 8,350
  • 38
  • 53
  • 109

1 Answers1

1

I debug this issue on apple's native applications and found that this is an iOS issue. To support this statement, I've attached a video of apple's native application named as Files.

Video link: https://www.dropbox.com/s/sr62440mpdpyr0s/RPReplay_Final1663641390.mp4?dl=0

Steps to reproduce this known issue of share activity controller(UIActivityViewController) in files application:

  • Open file application
  • Open a pdf file
  • Click on share button
  • Click on any application which results into opening other third party application such as Chrome
  • Go back to file application
  • Sharing options becomes unresponsive

As this issue is occurring in Files application too, thus we can say that this is an OS issue, not an issue related to my application.

pkc456
  • 8,350
  • 38
  • 53
  • 109