0
Я обработки схем пользовательских URL, как это в AppDelegate.m
:Пользовательский URL Scheme, не доводя приложение перед
-(void)applicationWillFinishLaunching:(NSNotification *)aNotification
{
NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager];
[appleEventManager setEventHandler:self
andSelector:@selector(handleGetURLEvent:withReplyEvent:)
forEventClass:kInternetEventClass andEventID:kAEGetURL];
}
- (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent
{
NSString * URL = [[event paramDescriptorForKeyword:keyDirectObject] stringValue];
//Do my work with URL
}
Это работает, но можно не привести приложение в передней каждый раз, когда я называю пользовательская схема?