iosobjective-csharingibooks

iBooks sharing with iOS Application


I have a question about iBooks sharing.

I want to open a book from iBooks with my iOS Application. To create this I have specified content type:

<dict>
    <key>CFBundleTypeName</key>
    <string>All Files</string>
    <key>LSHandlerRank</key>
    <string>Alternate</string>
    <key>LSItemContentTypes</key>
    <array>
        <string>public.calendar-event</string>
        <string>public.database</string>
        <string>public.executable</string>
        <string>public.data</string>
        <string>public.content </string>
        <string>public.item</string>
    </array>
</dict>

As far as I understand, this should contain all available files. Nevertheless, when I am sharing a document from iBooks, my application selection is not shown:https://drive.google.com/file/d/0B6ycu14tT4SGeExGZV9Ca3ZJeEk/view?usp=sharing

Where is the problem?


Solution

  • Those content types are used when an app is trying to directly open a file using a UIDocumentInteractionController (Document Interaction Programming Topics for iOS)

    What iBooks is showing is a share dialog, and if you want to appear there, your only option might be using an app extension (App Extension Programming Guide)

    In any case, you won't be getting much out of it, since what iBooks shares it's just title/author of the book and iTunes link if bought from there, not the actual book (you know, DRM and stuff...)