I have a chat app that also lets you send and receive documents. I'd like to be able to open .docx files in a suitable app like Word or Pages.
The code I'm currently using:
self.uidic = UIDocumentInteractionController(url: url)
self.uidic?.delegate = self
_ = self.uidic?.presentOpenInMenu(from: self.view.bounds, in: self.view, animated: true)
Now the picker pops up but doesn't show the right apps:
This is on simulator but on my device it also shows Airdrop, Notes and even Facebook. However no Word and no Pages, which are installed.
Same issue with PDFs: I have Adobe Acrobat installed but it's not showing.
Am I forgetting something?
Apparently http urls don't work like this.
My first solution was to just pass the url to Safari and let it sort it out, which works ok.
Now I download the file first to the documents folder, then use its local url and it shows the appropriate apps fine.