Question

I am using MacOSX 10.6, and the Xcode simulator is 4.2, but after trying my best, handleOpenURL does not get called in my appdelegate.m file, where I have implemented it. I have followed all the instructions in the tutorial given in the DropBox site(DropBox Tutorial),

but, once a user allows my application to access, after loggin in from there dropbox account through safari, the control is redirected to my "Link with DropBox" view, i.e. the view from which the user gets the chance to log in,

The problem is, the handleOpenURL method is not called, and neither is the didfinishWithLaunchingOptions method called. I have seen in some posts in various forums related to the same topic, that if we implement the latter(didfinishWithLaunchingOptions) method, handleOpenWithURL will not called, is it so?

if not, can you please help me find out the error in my code.. I am a beginner in this field, and will really appreciate your help in this regard.

The following is the code snippet in the appdelegate.m file

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{  
   NSLog(@"Inside didfinishwithoptions");
   DBSession* dbSession = [[[DBSession alloc] initWithAppKey:@"APP-KEY" 
                                                appSecret:@"APP-SECRET"
                                                     root:kDBRootAppFolder] // either kDBRootAppFolder or kDBRootDropbox
                        autorelease];
   [DBSession setSharedSession:dbSession];
   // Override point for customization after application launch.

   // Add the view controller's view to the window and display.
   [self.window addSubview:viewController.view];
   [self.window makeKeyAndVisible];

   return YES;
}

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url 
{
    NSLog(@"Inside handleOpenURL");
    return NO;
}

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top