Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tealeaf/platform/PluginManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
- (void) handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication;
- (void) onPause;
- (void) onResume;
- (void) performActionForShortcutItem: (UIApplicationShortcutItem *) shortcutItem;
@end


Expand Down
4 changes: 4 additions & 0 deletions tealeaf/platform/PluginManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ - (void) onResume {
[self postNotification:@"onResume" obj1:nil obj2:nil];
}

- (void) performActionForShortcutItem:(UIApplicationShortcutItem *) shortcutItem {
[self postNotification:@"performActionForShortcutItem:" obj1:shortcutItem obj2:nil];
}

- (void) dispatchJSEventWithJSONString: (NSString*) str andRequestId:(NSNumber *)requestId {
if (m_core) {
JSContext *cx = m_core.cx;
Expand Down
7 changes: 7 additions & 0 deletions tealeaf/platform/TeaLeafAppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,13 @@ - (void)application:(UIApplication *)app didReceiveLocalNotification:(UILocalNot
[self.pluginManager didReceiveLocalNotification:notification application:app];
}

- (void) application: (UIApplication *) application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL succeeded))completionHandler
{
[self.pluginManager performActionForShortcutItem:shortcutItem];
if (completionHandler) {
completionHandler(YES);
}
}

//// Splash Screen

Expand Down