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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:49:49+00:00 2026-05-16T14:49:49+00:00

I have implemented UIApplicationDelegate’s application:didFinishLaunchingWithOptions: and application:handleOpenURL: according to specification, i.e., application:didFinishLaunchingWithOptions: returns YES

  • 0

I have implemented UIApplicationDelegate’s

application:didFinishLaunchingWithOptions:

and

application:handleOpenURL:

according to specification, i.e.,

application:didFinishLaunchingWithOptions:
returns YES 

and

application:handleOpenURL: opens the URL. 

The code works under iOS 4 (in both cases, i.e., when the app is launched and when it becomes active from suspended state). However, the code does not work under iOS 3.2.

  • 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-16T14:49:50+00:00Added an answer on May 16, 2026 at 2:49 pm

    I give an answer to my own question. Finding out the solution took me a while and was quite frustrating. If you do an internet search you find some partial answers, but it still took me a while to work out the following solution and I do hope it adds some clarity.

    So first, the recommended behavior of your app appears to be the following (see Opening Supported File Types in iOS Ref Lib):

    • Do not implement applicationDidFinishLaunching: (see the note at UIApplicationDelegate).
    • Implement application:didFinishLaunchingWithOptions: and check the URL, return YES if you can open it, otherwise NO, but do not open it.
    • Implement application:handleOpenURL: and open the URL, return YES if successful, otherwise NO.

    In iOS 4, passing an URL to an app results in one of the following two behaviors:

    • If the app is launched then application:didFinishLaunchingWithOptions: is called and application:handleOpenURL: is called if and application:didFinishLaunchingWithOptions: returned YES.
    • If the app is becoming active from suspended state then application:didFinishLaunchingWithOptions: is not called but application:handleOpenURL: is called.

    However, in iOS 3.2 it appears as if application:handleOpenURL: is never called! A hint that the behavior is different under iOS 3.2 can be found in Handling URL Requests. There you find that application:handleOpenURL: is called if application:didFinishLaunchingWithOptions: is not implemented, but applicationDidFinishLaunching: is implemented. But application:handleOpenURL: is not called if application:didFinishLaunchingWithOptions: is implemented.

    Hence, one solution to make the code work under 3.2 and 4.0 is:

    • Open the URL in application:didFinishLaunchingWithOptions:, but then return NO to prevent that application:handleOpenURL: is called.
    • Open the URL in application:handleOpenURL:, in case you are under 4.0 and the app was in suspended state.

    I found this solution in another post, but I was confused, because it contradicted the recommendation in iOS Ref Lib documentation (namely that we should return YES in application:didFinishLaunchingWithOptions:). (At that point I did not realize that the documentation contradicts it self).

    I believe that the current iOS 4.0 behavior will be the future behavior I prefer the following solution:

    • Do not implement applicationDidFinishLaunching:.
    • Implement application:didFinishLaunchingWithOptions: and check the URL, return YES if you can open it, otherwise NO, but do not open it. If we are on 3.2, open the URL.
    • Implement application:handleOpenURL: and open the URL, return YES if successful, otherwise NO.

    So in summary, I implement the iOS 4 behavior and added the following line to application:didFinishLaunchingWithOptions:

        if([[[UIDevice currentDevice] systemVersion] hasPrefix:@"3.2"]) {
            [self application:application handleOpenURL:url];
        }
    

    which make the code work under 3.2.

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

Sidebar

Related Questions

I have implemented Twitter4J in my Android application and it's works fine. But after
I have implemented correctly bump's api, and added this code: - (void) configureBump {
I have implemented one matrix multiplication with boost::numeric::ublas::matrix (see my full, working boost code
I have implemented ADFS authentication for an asp.net 4.0 application. I have hosted the
I have implemented SQL Server session mode for an asp.net application. <sessionState mode=SQLServer compressionEnabled=true
I have implemented language localization to an Android application. My questions are: I can't
I have implemented a ViewFlipper with 8 child view in my application as follows.
I have implemented one application in android which uses epublib to view .epub files.
I have implemented Solr search in one of my .net application. Everything working fine
I have implemented quartz scheduler in my application. And its working upto a certain

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.