iphoneDevGuy
iphoneDevGuy

Reputation: 1

associate iphone application extension like somefile.my.txt

In an iPhone application I am dealing with files that have a double extension like *.my.txt

Thanks to tips found here, I've successfully associated *.txt with my app, but am unable to associate my.txt with :

 <key>UTExportedTypeDeclarations</key>
 <array>
  <dict>
   <key>UTTypeIdentifier</key>
   <string>com.site.my.txt</string>
   <key>UTTypeDescription</key>
   <string>My Text File Type</string>
   <key>UTTypeTagSpecification</key>
   <dict>
    <key>public.filename-extension</key>
    <string>my.txt</string>
    <key>public.mime-type</key>
    <string>application/mytxt</string>
   </dict>
   <key>UTTypeConformsTo</key>
   <array>
    <string>public.data</string>
   </array>
  </dict>
 </array>

I don't have control over the extension unfortunately.
I don't want *.txt to open in my app, only those with the extension *.my.txt

Would anyone have any tips for me?

Upvotes: 0

Views: 405

Answers (1)

Ole Begemann
Ole Begemann

Reputation: 135578

By definition, the file extension is everything after the last period in the filename. So the extension of your files is txt and not my.txt. What you want will not work.

Upvotes: 1

Related Questions