M5ApplicationOpenURL 1.0.0

M5ApplicationOpenURL 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2015

Maintained by Mathew Huusko V.



Respond to application open URL event on iOS and Mac without owning/muddying the app delegate. Easy. Decoupled.

Usage

- (BOOL)applicationOpenURL:(NSURL *)URL fromApplication:(NSString *)sourceApplication {
    NSLog(@"Opened via %@ from source application %@.", URL.absoluteString, sourceApplication);

    if (/*some check against URL*/) {
        return YES;
    }

    return NO;
}

...

[M5ApplicationOpenURL addHandlerWithTarget:self selector:@selector(applicationOpenURL:fromApplication:)];

//OR

[M5ApplicationOpenURL addHandlerWithCallback:^BOOL(NSURL *URL, NSString *sourceApplication) {
    NSLog(@"Opened via %@ from source application %@.", URL.absoluteString, sourceApplication);

    if (/*some check against URL*/) {
        return YES;
    }

    return NO;
}];