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 7935611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:58:37+00:00 2026-06-03T21:58:37+00:00

I want to associate a text-based custom file type with my app on iOS.

  • 0

I want to associate a text-based custom file type with my app on iOS.

When I open a link to the file which is behind some php script, Safari shows the “open in” option with my app in it, which is OK.

However when I open a link which points directly to my file (running a web server for test purposes), Safari decides that it can read the file itself and displays the content by itself. Which is definitely not OK.

On the side note, if I substitute any binary file (zip, …) and use my extension, file associating will still work.

The code in plist-info:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array>
            <string>320.png</string>
            <string>64.png</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>My File</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.Company.Product.ext</string>
        </array>
    </dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeConformsTo</key>
        <array>
            <string>public.data</string>
            <string>public.content</string>
            <string>public.text</string>
            <string>public.plain-text</string>
            <string>public.utf16-plain-text</string>
            <string>public.utf16-external-plain-text</string>
            <string>public.utf8-plain-text</string>
        </array>
        <key>UTTypeDescription</key>
        <string>My File</string>
        <key>UTTypeIdentifier</key>
        <string>com.Company.Product.ext</string>
        <key>UTTypeTagSpecification</key>
        <dict>
            <key>public.filename-extension</key>
            <string>ext</string>
            <key>public.mime-type</key>
            <string>application/octet-stream</string>
        </dict>
    </dict>
</array>

My question is: how to persuade Safari to NOT open the file itself? It it even possible? Do I have to use some mime type other than “application/octet-stream”?

  • 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-06-03T21:58:40+00:00Added an answer on June 3, 2026 at 9:58 pm

    Define a custom MIME type (i.e. application/x-my.custom.type) for your files, and have PHP or your web server serve them. This should help.

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

Sidebar

Related Questions

In my app I want users to be able to associate a file(s) they
I want to associate a text or xml file with my project. So when
If you want to associate some constant value with a class, here are two
I want to associate additional data with each QTableWidgetItem inserted into the table, in
So I have a database of recipes and I want to associate keywords or
I have two Collection objects, I want to associate each object of these two
I want to browse through XML using a TTreeView. To associate the treeview nodes
I want to remove rectangles etc that enclose text in a screenshot image, so
I am trying to create a custom HTML Helper that encapsulates some presentation logic
I want to create a JTable with a header inside some cells. But I

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.