Skip to content

maximbilan/iOS-Document-Iteraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iOS: How to copy epub files from your app to iBooks app

alt tag

Apple provides this possibility via class UIDocumentInteractionController. It’s really simple to do. I’ll just keep here.

Example:

var controller = UIDocumentInteractionController()

let epubURL = NSBundle.mainBundle().URLForResource("test", withExtension: "epub")
controller.URL = epubURL
if !controller.presentOpenInMenuFromRect(button.bounds, inView: view, animated: true) {
  print("You don't have an app installed that can handle ePub files.")
}

alt tag

A class UIDocumentInteractionController has other features, you can read more details in Apple documentation.

About

iOS: How to copy epub files from your app to iBooks app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages