An open API service indexing awesome lists of open source software.

https://github.com/maximbilan/ios-document-iteraction

iOS: How to copy epub files from your app to iBooks app
https://github.com/maximbilan/ios-document-iteraction

apple epub-files ibooks ios ios-app swift tutorial

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

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

![alt tag](https://raw.github.com/maximbilan/iOS-Document-Iteraction/master/img/img1.png)

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](https://raw.github.com/maximbilan/iOS-Document-Iteraction/master/img/img2.png)

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