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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:26:38+00:00 2026-05-28T04:26:38+00:00

I am building a viewer application, which needs to accept any kind of file

  • 0

I am building a viewer application, which needs to accept “any” kind of file as the selected file to view. In fact it even should accept folders, because in that case I want to show information relevant about the folder such as number of files and such.
Now suppose I decided to use the NSDocument based application architecture to do this. How do I make my application accept any kind of file (and not get these [NSDocumentController reopenDocumentForURL:withContentsOfURL:display:completionHandler:] failed messages?

  • 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-28T04:26:38+00:00Added an answer on May 28, 2026 at 4:26 am

    Based on the discussion:
    iOS Document/File type associations – wildcard UTI? I managed to get it working (it seems):

    1. Go in Xcode (I am using 4.1) to the "Project Navigator" and select the target application.
    2. Select the "Info" tab
    3. Go to the "Document Types" element in the list. If you used the default project creation it will have your custom document type already filled in.
    4. Now change the Name property to public.item.

    Now the application will be able to open any kind of file as its document.
    One thing to remember is to keep the following (automatically generated during project creation) methods in place. I deleted them, assuming I did not need them, and that created another error:

    1. - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
    2. - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError

    and to be able to have folders as your document, add:

    • - (BOOL)readFromFileWrapper:(NSFileWrapper *)fileWrapper ofType:(NSString *)typeName error:(NSError **)outError

    It seems to work for now, any additional remarks are welcome.

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

Sidebar

Related Questions

I'm building a specialized viewer application which loads external SWFs. var content:Sprite = ...
I am building an asp.net mvc web site which needs to host some JMOL
I'm building a silverlight pivot viewer collection which contains html descriptions; however the html
I am building a 3D image viewer which has Three.JS plane geometries as placeholders
We are building an application on .net, And it is an Image Viewer application
I have this legacy database for which I'm building a custom viewer using Linq
building a site using PHP and MySQL that needs to store a lot of
Building my first SL MVVM application (Silverlight4 RC) and have some issues i don't
Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI
Building an iPhone OS application that will allow users to anonymously post information to

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.