I want to read .epub file in iBooks apps so I am using UIDocumentInteractionController to open.epub file in iBooks .Everything is working fin but I want to show only iBooks app instead of other apps in UIDocumentInteractionController so I added UTI for iBooks but still its display all the app below is my code.
var sharingController = UIDocumentInteractionController()
sharingController.url = url
sharingController.uti = "com.apple.iBooks"
sharingController.name = url.lastPathComponent
sharingController.presentOptionsMenu(from: view.frame, in: view, animated: true)
UTI is not bundle identifier, but uniform type identifier of content.
Try the following
or using constant from MobileCoreServices
Update: btw as provided above (and other) option do not limit the called option dialog as documented (see below), because it's determined all applications capable to quick look, copy, open, etc for the file
if you'd need to
openonly the content of menu would be more short, only to readers supported epub.