How to open epub file in iBook from app

How to download epub file and open it in iBook in my swift app. I tried to deal with it this way:

var urlAt = NSURL(string: epubFileUrl);
    if (UIApplication.sharedApplication().canOpenURL(urlAt!)){
        UIApplication.sharedApplication().openURL(urlAt!);
    }

      

The application opened the safari, downloaded my file and offered me "how to open this file"

safari download result

My question is can I download the epub file in my app and open (or suggest to open it) in the iBooks app.

+3


source to share





All Articles