0

I want to enable "Open in..." feature to .html file attachment send through email.

I have modified Info.plist file as below, for .odt file attachment it is working fine.

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeName</key>
            <string>XDXF Document</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.mouritech.odt</string>
            </array>
        </dict>
    </array>
    <key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeDescription</key>
            <string>html - XML Dictionary eXchange Format</string>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.text</string>
            </array>
            <key>UTTypeIdentifier</key>
            <string>com.mouritech.odt</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>public.filename-extension</key>
                <string>odt</string>
                <key>public.mime-type</key>
                <string>text/html</string>
            </dict>
        </dict>
    </array> 

When I replace odt with html, it is not showing "Open in..." feature, by default it is opening.

Ravi Varma
  • 131
  • 1
  • 1
  • 10
  • Not sure, but isn't the Uniform Type Identifier for .html files already declared as public.html? So your application should just add support for that type identifier rather than specifying a new type identifier? – dirkgroten Aug 28 '13 at 06:57
  • I changed UTTypeConformsTo public.html still not working... – Ravi Varma Aug 28 '13 at 07:03
  • No, you're declaring a new type you _export_ instead of declaring which types your application can _import_. `UTImportedTypeDeclarations` is what you want. Or just add `public.html` to your array of `LSItemContentTypes`. – dirkgroten Aug 28 '13 at 07:05
  • i added public.html in LSItemContentTypes but still not working – Ravi Varma Aug 28 '13 at 07:16
  • Might your issue be similar to the one I'm having? See my current question: http://stackoverflow.com/q/19000018/751061 Try testing your app from a different application's "open in..." dialog. For example the `DocInteraction` app by Apple. (https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1) – NHDaly Sep 25 '13 at 08:48

0 Answers0