views:

101

answers:

1

Hi

I'm trying to associate an SQLite3 database file with our app so that it's easy to open backed up database from an email. The following however does not seem to work as Mail still doesn't recognizes the file (on an iPad and iPhone 4):

<key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeConformsTo</key>
        <array>
            <string>public.database</string>
            <string>public.data</string>                    
        </array>
        <key>UTTypeDescription</key>
        <string>App Database File</string>
        <key>UTTypeIdentifier</key>
        <string>com.company.App.db</string>
        <key>UTTypeTagSpecification</key>
        <dict>
            <key>public.filename-extension</key>
            <string>db</string>
            <key>public.mime-type</key>
            <string>application/x-sqlite3</string>            
        </dict>
    </dict>
</array>

 <key>CFBundleDocumentTypes</key>
 <dict>
  <key>CFBundleTypeName</key>
  <string>App Database</string>
  <key>CFBundleTypeIconFiles</key>
  <array>
   <string>Icon-Small.png</string>
   <string>Icon.png</string>
  </array>
    <key>CFBundleTypeRole</key>
        <string>Editor</string>

  <key>LSItemContentTypes</key>
  <array>
   <string>com.company.App.db</string>
  </array>
  <key>LSHandlerRank</key>
  <string>Alternate</string>
 </dict>
</dict>

Any idea what I'm doing wrong?

A: 

Okay I've sorted this out. If you instead use 'target's info' panel and add your document type there (and then select 'SQLite' as the type') it just works. Obviously provided you've exported the type as above.

thanks! what do you put on OS Types, Class and UTI when you filled it on the target's info panel?
Digital Robot