views:

132

answers:

0

Hi Everyone,

I've been able to successfully map an application using UTI's from mail using my own file types such as .blah, .test etc, however I would like to create a UTI for the .ics (iCalendar meeting requests) extension.

I thought this would be rather simple, as I've been able to test reference to Word Documents, PDF's and others with no problem. But something seems different here.

Steps to replicate:
1. Start from a new window project (universal or otherwise)
2. Add the below xml to the info.plist file
3. Deploy to a device running something later than 3.2
4. Force Quit Mail or Restart iPhone
5. Open mail. Find an email with a .ics attachment.

If it is just an image that cannot be opened you're in the same situation as me, otherwise if it is surrounded by a grey border and gives you the option to open in your application then please share your secret (or configuration of xcode / ios).

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array>
            <string>FileAttach.png</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>ICS</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.apple.ical.ics</string>
        </array>
    </dict>
</array>

If anyone is able to test this with a fresh project and report the results it would be greatly appreciated.

Does anyone know of a reason why this UTI reference would only work in some situations? Or know any of the mysteries that surround ics attachments?

Many Thanks,
GigabyteJack