Tuesday 27 August 2013

How to enable “open in…” feature to html file attachment in iOS app

How to enable "open in…" feature to html file attachment in iOS app

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 or pdf, it is not showing "Open in..."
feature, by default it is opening.

No comments:

Post a Comment