You've already forked hotpocket
BTHLABS-58: Share Extension in Apple Apps
This commit is contained in:
@@ -7,14 +7,32 @@
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import "HPAuthFlow.h"
|
||||
#import "HPCredentialsHelper.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
|
||||
// Override point for customization after application launch.
|
||||
-(void)applicationDidFinishLaunching:(NSNotification *)notification {
|
||||
self.authFlow = [[HPAuthFlow alloc] init];
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
|
||||
-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void)application:(NSApplication *)application openURLs:(NSArray<NSURL *> *)urls {
|
||||
HPAuthParams *receivedAuthParams = nil;
|
||||
for (NSURL *url in urls) {
|
||||
receivedAuthParams = [self.authFlow handlePostAuthenticateURL:url];
|
||||
|
||||
if (receivedAuthParams != nil) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (receivedAuthParams != nil) {
|
||||
[self.authFlow handleAuthParams:receivedAuthParams];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user