Question

I'm creating a document based app only for iOS. The document is saved as a NSBundle which contains a 'thumbnail.png'.

How to quicklook this iOS document on OSX, so that the 'thumbnail.png' is shown in Finder?


I can see all my iCloud documents in Finder. At the moment I have around 90 documents, so I would like to QuickLook them, to make debugging easier.

/Users/johndoe/Library/Mobile Documents/1234ABCDEF~com~johndoe~johndoeapp/Documents/

Perhaps there a special naming convension that indicates that 'thumbnail.png' is the file that QuickLook should show.

Perhaps it's not possible at all?

Was it helpful?

Solution

There is a naming convention to allow you to place static files in your bundle.

From the docs

http://developer.apple.com/library/mac/#documentation/userexperience/conceptual/Quicklook_Programming_Guide/Articles/QLImplementationOverview.html#//apple_ref/doc/uid/TP40005020-CH6-SW3

If you want to specify static thumbnail and preview images for a bundled document, you can take the easiest approach—it doesn’t even require a generator. Just have your application place the images inside the document bundle in a subfolder named QuickLook; the image file for thumbnails should be named Thumbnail.ext and the file for previews should be named Preview.ext (where ext is an extension such as tiff, png, or jpg). If you decide on this approach, you should not create a generator.

and from experience its case sensitive.

So in your bundle just add a subfolder QuickLook and in that folder place Preview.pdf or jpg or png

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top