Ios | AppDelegate application:openURL:options: not being called


I’m trying to implement facebook log-in and this requires the app to handle an url from the internal webview that asks the user to log in with facebook.

Unfortunately, I am unable to get the application:openURL:options to fire.

I’ve check my plist and the URL schemes for facebook seam to have generated correctly.

I’ve been stuck on this for a couple days and was hoping someone might have an idea how to tap into that delegate method.

The following is the code. The comments explain what works and what does not.

@implementation FacebookDelegate

+ (void) load
    //.. THIS GETS CALLED :)
    NSLog(@"FacebookDelegate | mm |  load()");

    //Instatiate delegate
    static FacebookDelegate * instance = [[FacebookDelegate alloc] init];

    //This Notification works :)
    [[NSNotificationCenter defaultCenter] addObserver:instance selector:@selector(application_didFinishLaunchingWithOptions:) name:UIApplicationDidFinishLaunchingNotification    object:nil];

    //This notification does not :(
    [[NSNotificationCenter defaultCenter] addObserver:instance selector:@selector(application_openURL_options:) name:@"NMEAppDelegate application:openURL:options:" object:nil];

- (void) application_didFinishLaunchingWithOptions:(NSNotification *)notification
    NSLog(@"FacebookDelegate | mm |  application_didFinishLaunchingWithOptions()");

- (void) application_openURL_options:(NSNotification *)notification
    NSLog(@"FacebookDelegate | mm |  application_openURL_options()");


You might want to take a look at this extension:

We use it in our app and it’s working on iOS and Android. We did modify it a bit because of limitations with overriding the willFinishLaunchingWithOptions in the OpenFL stack. We created a delegate registry to initialize all of our extension that require initialization in willFinishLaunchingWithOptions.

For the record, it appears that SDL handles openURL on iOS using the SDL_DropEvent API. This is currently implemented in Lime window.onDropFile, similar to a drag-and-drop on the desktop. I’m not sure if SDL is passing open with options, though