I created my own file type called foo. It is text file. What I want to do is when user touches file name with extension .foo in Safari, my app is executed. But, because it is text file, some sites show that file in text viewer. How can I prevent that? It works fine in other sites. This is what I wrote in my info.plist.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>myicon.png</string>
</array>
<key>CFBundleTypeName</key>
<string>my file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.mycompany.foo</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeDescription</key>
<string>my file</string>
<key>UTTypeIdentifier</key>
<string>com.mycompany.foo</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>foo</string>
</dict>
</dict>
</array>