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
- Host: GitHub
- URL: https://github.com/maximbilan/ios-document-iteraction
- Owner: maximbilan
- License: mit
- Created: 2016-03-27T14:53:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-22T09:47:37.000Z (over 6 years ago)
- Last Synced: 2025-03-27T20:44:26.582Z (about 2 months ago)
- Topics: apple, epub-files, ibooks, ios, ios-app, swift, tutorial
- Language: Swift
- Homepage:
- Size: 390 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# iOS: How to copy epub files from your app to iBooks app

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.")
}
A class UIDocumentInteractionController has other features, you can read more details in Apple documentation.