3

I'm trying to write an iOS app that should be able to open kml and kmz files from google earth. I have added the following lines in the cfg file , but should be wrong ( I can't see my application listed when I try to open a kml file from another app, i.e. Mail) :

    <key>CFBundleDocumentTypes</key>
    <array>
    <dict>
        <key>CFBundleTypeMIMETypes</key>
        <array>
            <string>application/vnd.google-earth.kml+xml</string>
        </array>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>kml</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>Google Kml</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
    </dict>
</array>

Please help me to find the error...

thewinchester
  • 472
  • 4
  • 11
  • 25
atrebbi
  • 553
  • 3
  • 20

1 Answers1

0

Add these lines to Info.plist:

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeIconFiles</key>
            <array/>
            <key>CFBundleTypeName</key>
            <string>Google Earth KML Document</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.google.earth.kml</string>
            </array>
        </dict>
    </array>
    <key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.xml</string>
            </array>
            <key>UTTypeDescription</key>
            <string>Google Earth KML Document</string>
            <key>UTTypeIdentifier</key>
            <string>com.google.earth.kml</string>
            <key>UTTypeReferenceURL</key>
            <string>http://earth.google.com/kml/</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>com.apple.ostype</key>
                <string>GKml</string>
                <key>public.filename-extension</key>
                <array>
                    <string>kml</string>
                </array>
                <key>public.mime-type</key>
                <string>application/vnd.google-earth.kml+xml</string>
            </dict>
        </dict>
    </array>
Nadzeya
  • 641
  • 6
  • 16