7

I was using a Share extension in my app in order to import audio files and it was working on iOS12. Now in iOS 13 is not working anymore, when I press the share button my app doesn't appear in the share sheet. I think that maybe something has changed in the plist or similar but I coudn't find any information. Does anyone have the same problem?

NB: I don't wanna use the copy - paste strategies, only the share extension.

Fab
  • 816
  • 8
  • 17
  • 1
    I got this issue in iOS13 too. iOS12 was working fine and iOS13 totally blew it – Alberto Giunta Oct 08 '19 at 12:00
  • Actually a lot of apps have disappeared from the share panel in iOS13 so I guess this is a common issue. Only messaging apps seem to have got it working, I even looked at Telegram open source code but couldn't get any useful insights :( – Alberto Giunta Oct 08 '19 at 12:14
  • Share extensions for iOS 13 have a lot of new features and changes. People just haven't updated their apps in time to support the new implementations. – Peter Suwara Oct 10 '19 at 14:11

2 Answers2

1

Try this for iOS 13

    DispatchQueue.main.async {

      let activityItem = URL.init(fileURLWithPath: Bundle.main.path(forResource: "audio", ofType: "mp3")!)

      let activityVC = UIActivityViewController(activityItems: [activityItem],applicationActivities: nil)
      activityVC.popoverPresentationController?.sourceView = self.view

      self.present(activityVC, animated: true, completion: nil)
    }
Nick
  • 875
  • 6
  • 20
0

For IOS 13 you Should add below code inside your open url method.

UISceneOpenExternalURLOptions * options = [[UISceneOpenExternalURLOptions alloc] init];
options.universalLinksOnly = false;