iosswiftqlpreviewcontrollerios-sharesheet

QLPreviewController sharesheet greyed out on iOS App


So the QuickLookPreview displays correctly as usual, but when you try and use the Apple built-in sharesheet it is sliding up a see-through grey view that is displaying nothing else on it. Has anyone had experience with this?

Thought it might be something obscure like an alpha view in the background...

Appreciate any good suggestions.


Solution

  • So in our case this was being caused by an Activity extension that was not even being used anymore. Super weird bug that took quite a lot of digging to find, but posting it here just in case anyone else has similar weirdness one day and can have a better time of it.

    extension UIActivityViewController {
    override open func viewDidLoad() {
        super.viewDidLoad()
        //self.unusedfunction()
    }
    
    func unusedfunction() {
        UIBarButtonItem.appearance(whenContainedInInstancesOf: [UIActivityViewController.self]).setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.Theme.Black], for: .normal)
    }
    }
    

    So the issue was being caused by the super.viewDidLoad() and we just had to delete/comment out that extension for the share feature to start displaying correctly again.