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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:19:55+00:00 2026-05-25T03:19:55+00:00

Before doing a openUrl: to launch an app that should callback my app (like

  • 0

Before doing a openUrl: to launch an app that should callback my app (like an app that acts according to the x-callback-url specification), how can I programmatically check that my application callback is working, before calling the other app?

  • 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-25T03:19:55+00:00Added an answer on May 25, 2026 at 3:19 am

    This is my current solution:

    - (BOOL) respondsToUrl:url
    {
        BOOL schemeIsInPlist = NO; // find out if the sceme is in the plist file.
        NSBundle* mainBundle = [NSBundle mainBundle];
        NSArray* cfBundleURLTypes = [mainBundle objectForInfoDictionaryKey:@"CFBundleURLTypes"];
        if ([cfBundleURLTypes isKindOfClass:[NSArray class]] && [cfBundleURLTypes lastObject]) {
            NSDictionary* cfBundleURLTypes0 = [cfBundleURLTypes objectAtIndex:0];
            if ([cfBundleURLTypes0 isKindOfClass:[NSDictionary class]]) {
                NSArray* cfBundleURLSchemes = [cfBundleURLTypes0 objectForKey:@"CFBundleURLSchemes"];
                if ([cfBundleURLSchemes isKindOfClass:[NSArray class]]) {
                    for (NSString* scheme in cfBundleURLSchemes) {
                        if ([scheme isKindOfClass:[NSString class]] && [url hasPrefix:scheme]) {
                            schemeIsInPlist = YES;
                            break;
                        }
                    }
                }
            }
        }
    
        BOOL canOpenUrl = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString: url]];
    
        return schemeIsInPlist && canOpenUrl;
    }
    

    The limitation is that we are checking that this app registered for the scheme and some application responds to that url.

    AFAIK this does not guarantee that your application is the actual responder for that scheme (in the case where another app also registered for that scheme).

    From what I tried, it seems that iOS opens the first installed app for each unique url scheme.

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

Sidebar

Related Questions

Can i make a If Else-statement that finishes a div before doing else? I
I have a wcf client that before doing some complicated interactions with the wcf
I've just converted MYISAM into InnoDB. Before doing that, I've saved the table (see
I have an old branch, which I would like to delete. However, before doing
I really like the idea of validating forms client-side before doing so server-side. If
What libraries/jars would you suggest to use? What theory should I read before doing
Consider this C construct that checks for errors before doing actual work: int function(struct
I have a record that needs to be validated before doing some action. Am
I want to validate a condition before doing the next step, but only raise
Is there a way to run the changed files through a filter before doing

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.