Advertisement
Guest User

UnityAppController.mm changes

a guest
Sep 1st, 2014
797
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import <Libraries/GLTNotificationResponder.h> // add this line with your imports
  2.  
  3. - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
  4. {
  5.     ...
  6.     UILocalNotification *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];
  7.     if (notification)
  8.     {
  9.         UnitySendLocalNotification(notification);
  10.         [GLTNotificationResponder SendNotification:notification]; // add this line
  11.     }
  12.     ...
  13. }
  14.  
  15. - (void)application:(UIApplication*)application didReceiveLocalNotification:(UILocalNotification*)notification
  16. {
  17.     AppController_SendNotificationWithArg(kUnityDidReceiveLocalNotification, notification);
  18.     UnitySendLocalNotification(notification);
  19.     [GLTNotificationResponder SendNotification:notification]; // add this line
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement