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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:59:31+00:00 2026-05-22T22:59:31+00:00

Apple’s documentation for UIDocumentInteractionController presentOpenInMenuFromBarButtonItem:animated: method states that If there are no registered apps

  • 0

Apple’s documentation for UIDocumentInteractionController presentOpenInMenuFromBarButtonItem:animated: method states that “If there are no registered apps that support opening the document, the document interaction controller does not display a menu.” In my app I want to display a button if and only if there is an app on the device that will open it. (I only want the button to pop up a menu to open a file; I don’t want QuickLook, Copy or Print). As things stand, if the button is there, but no apps are registered that can open the relevant file, the user gets the unsatisfactory experience of a button that does nothing when tapped.

So – can I find out whether or not there are any / no registered apps that support opening a specific document type? Clearly, UIDocumentInteractionController instances can find this out. Is there a public API way of finding it out?

  • 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-22T22:59:32+00:00Added an answer on May 22, 2026 at 10:59 pm

    OK, more research reveals a stackoverflow user frenchkiss-dev has a solution – derived from reading the docs more carefully than me and some lateral thinking. My code below, based on frenchkiss-dev’s answer, sits in a ViewDidAppear method and disables my button if opening and then closing the open file menu (without animation) reveals that there are no apps that can handle opening the file. The context for this snippet is that a UIDocumentInteractionController has already been set up in viewDidLoad and is accessed via [self docInteractionController].

    BOOL isAnAppToOpenURL = [[self docInteractionController] presentOpenInMenuFromRect:CGRectZero inView:[self view] animated: NO];
    [[self docInteractionController] dismissMenuAnimated:NO];
    
    if (!isAnAppToOpenURL)
    {
        // iOS think NO app is present on the device that
        // can open the URL set on the UIDocumentInteractionController
        [[self openFileButton] setEnabled:NO];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read the Apple documentation. They list the apps registered, yet in their
Apple says that there is a visibleRect method on the mac ( Source ),
Apple states that all apps using in-app purchases have to put this [[SKPaymentQueue defaultQueue]
The Apple Developer Documentation (link is dead now) explains that if you place a
In the Apple documentation for NSRunLoop there is sample code demonstrating suspending execution while
Apple's Threading Programming Guide states that: Although good for occasional communication between threads, you
Apple states that if you want to report a GKAchievement but you get a
Apple states in its App Store Review Guidelines Apps using IAP to purchase physical
I know the Apple documentation has the following delegate method: - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView; //
Apple's documentation recommends installing a keep-alive handler in the applicationDidEnterBackground: method. It also says

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.