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)
}
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: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.