Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

QuickLook broken by BlocksKit #83

Closed
johntmcintosh opened this issue Jun 15, 2012 · 2 comments
Closed

QuickLook broken by BlocksKit #83

johntmcintosh opened this issue Jun 15, 2012 · 2 comments

Comments

@johntmcintosh
Copy link

I've been enjoying using BlocksKit, but came across a surprising issue in one of my projects. When I attempt to display a .pdf or .docx file using QuickLook (QLPreviewController) the file is not displayed if BlocksKit is included in the project. If I remove BlocksKit from the project, these files are displayed correctly in the QLPreviewController. JPG attachments are displayed correctly whether BlocksKit is included or not.

To verify this, I created a new project with a single view controller that has a button that launches a QLPreviewController:

- (IBAction)click:(id)sender
{
    QLPreviewController *controller = [[QLPreviewController alloc] init];
    controller.dataSource = self;
    controller.currentPreviewItemIndex = 0;
    [self presentModalViewController:controller animated:YES];
}

- (NSInteger) numberOfPreviewItemsInPreviewController: (QLPreviewController *) controller
{
    return 1;
}

- (id <QLPreviewItem>) previewController: (QLPreviewController *) controller previewItemAtIndex: (NSInteger) index
{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"pdf"];
    NSURL *url = [NSURL fileURLWithPath:path];
    return url;
}

In the initial project, when the button is pressed, the preview is displayed. Then, I added BlocksKit to the new project with CocoaPods with the following Podfile.

platform :ios
dependency 'BlocksKit',       '~> 1.5'

Then, I opened the newly workspace and ran my project again. This time the preview did not display. The preview controller is displayed, but the .pdf or .docx content never shows up.

This makes me suspect that one of the categories in BlocksKit is somehow interfering with the way QuickLook displays PDF and Word documents. Do you have any ideas what might be causing this?

@zwaldowski
Copy link
Collaborator

Investigating. Sorry for the inconvenience.

zwaldowski added a commit that referenced this issue Jun 24, 2012
…delegates. Closes issue #83.

Signed-off-by: Zachary Waldowski <zwaldowski@gmail.com>
@zwaldowski
Copy link
Collaborator

Sorry for the delay, John, it was a rather easy fix! It'll be released today as part of BlocksKit 1.5.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants