Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7590643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:27:20+00:00 2026-05-30T20:27:20+00:00

I am trying to associate a custom file that my app creates (it’s XML)

  • 0

I am trying to associate a custom file that my app creates (it’s XML) so that users can email the files to each other. I have followed the excellent tutorial here:

How do I associate file types with an iPhone application?

The file is named XXX.checklist

But it’s not associating. I believe my problem is with the public.mime-type key as I have no idea what I am supposed to put there. Below is the associated info-plist entries

<key>CFBundleDocumentTypes</key>
<array>
    <array>
        <dict>
            <key>CFBundleTypeIconFiles</key>
            <array>
                <string>docIcon64.png</string>
                <string>docIcon320.png</string>
            </array>
            <key>CFBundleTypeName</key>
            <string>My App Checklist</string>
            <key>CFBundleTypeRole</key>
            <string>Viewer</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.mycompany.appid.checklist</string>
            </array>
        </dict>
    </array>
</array>

<key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeConformsTo</key>
        <array>
            <string>public.content</string>/// i tried public.text but it allowed the file to be opened by the devices default text viewer which I would not like. 
        </array>
        <key>UTTypeDescription</key>
        <string>My App Checklist</string>
        <key>UTTypeIdentifier</key>
        <string>com.mycompany.appid.checklist</string>
        <key>UTTypeTagSpecification</key>
        <dict>
            <key>public.filename-extension</key> // fixed this key
            <string>checklist</string>
            <key>public.mime-type</key>
            <string>text/xml</string> /// changed to this, still doest work though
        </dict>
    </dict>
</array>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:27:21+00:00Added an answer on May 30, 2026 at 8:27 pm

    If your UTI is declared as public.data I assume that your checklist file is a custom binary data.

    You should then simply use application/octet-stream as a mime-type.

    UPDATE:
    Got it, your problem is more trivial than anyone would expect. One more thing for starters – public.data is okay for all its descendants (including public.xml), so for an XML file you can set any of these:

    • public.item
    • public.data
    • public.content
    • public.text
    • public.xml

    The list of applications offered to open your file type is build based on known apps in system that can handle given UTI plus yours. Since the default text editor opens public.text and public.xml it will be the default action for your kind of files (your application will show up on the list invoked by a long press on a mail attachment).

    There is (apparently) no applications that handle public.data (the same for public.content), so when you use this UTI, the default action for an attachment would be to open it in your app.

    Now to the point… your CFBundleDocumentTypes has one extra <array> level:

    <key>CFBundleDocumentTypes</key>
    <array>
        <array>     <!-- remove this line -->
            <dict>
                <key>CFBundleTypeIconFiles</key>
                <array>
                    <string>docIcon64.png</string>
                    <string>docIcon320.png</string>
                </array>
                <key>CFBundleTypeName</key>
                <string>My App Checklist</string>
                <key>CFBundleTypeRole</key>
                <string>Viewer</string>
                <key>LSHandlerRank</key>
                <string>Owner</string>
                <key>LSItemContentTypes</key>
                <array>
                    <string>com.mycompany.appid.checklist</string>
                </array>
            </dict>
        </array>     <!-- and this line -->
    </array>
    

    And it’s gonna work. The UTExportedTypeDeclarations part is already fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use CFBundleDocumentTypes to associate a custom file extension with my application.
I am trying to create a custom HTML Helper that encapsulates some presentation logic
I'm trying to define a custom formatter for my class, but I can't find
I trying to serialize a custom type which holds a dictionary among other members.
I'm trying to build a Drupal site in which users can input records containing
This is my first time making a hash table. I'm trying to associate strings
Now I am trying to build a store that associates with google books for
I am trying to create an associative array that collects the following (existing on
I am trying to create a WiX custom action which will allow me to
I want to add a Custom field to the ContactsContract content provider. I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.