Open in iBooks ios 11

My code hasn’t working since iOS 11 update


#import <UIKit/UIKit.h>

@interface ViewController : UIViewController <UIDocumentInteractionControllerDelegate>
- (IBAction)catalogSender:(id)sender;
@property (weak, nonatomic) IBOutlet UIButton *catalogButton;



#import "ViewController.h"

@interface ViewController ()
@property (nonatomic, strong) UIDocumentInteractionController *controller;


@implementation ViewController

- (void)viewDidLoad
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.


- (void)didReceiveMemoryWarning
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.

- (UIDocumentInteractionController *)controller {

    if (!_controller) {
        _controller = [[UIDocumentInteractionController alloc]init];
        _controller.delegate = self;
    return _controller;

#pragma mark - Delegate Methods

- (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller {

    return  self;

- (void)documentInteractionController:(UIDocumentInteractionController *)controller willBeginSendingToApplication:(NSString *)application {

    NSLog(@"Starting to send this puppy to %@", application);

- (void)documentInteractionController:(UIDocumentInteractionController *)controller didEndSendingToApplication:(NSString *)application {

    NSLog(@"We're done sending the document.");

- (IBAction)catalogSender:(id)sender {
    // send a IBOOKS file over to Dropbox
    NSURL *zipURL = [[NSBundle mainBundle]URLForResource:@"document" withExtension:@"ibooks"];
    self.controller.URL = zipURL;

    if (![self.controller presentOpenInMenuFromRect:_catalogButton.bounds inView:_catalogButton animated:YES]) {

        UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:nil message:@"You don't have an app installed that can handle ibooks files." delegate:self cancelButtonTitle:@"Aceptar" otherButtonTitles:nil, nil];
        [alertView show];

When I choose copy to iBooks nothing happen.

I get the message “Starting to send this puppy to” and “We’re done sending the document”, but the document hasn’t copied to iBooks.

what am I doing wrong? or what has changed in IOS 11 so that it has stopped working?

How can I open a local ibook file of my app and open it on iBooks app?

Open in iBooks ios 11