Browse Source

add k_notificationCenter_applicationDidEnterBackground

marinofaggiana 4 years ago
parent
commit
dbf88950e5
2 changed files with 4 additions and 0 deletions
  1. 2 0
      iOSClient/AppDelegate.m
  2. 2 0
      iOSClient/CCGlobal.h

+ 2 - 0
iOSClient/AppDelegate.m

@@ -265,6 +265,8 @@
 {
     NSLog(@"[LOG] Enter in Background");
             
+    [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:k_notificationCenter_applicationDidEnterBackground object:nil];
+    
     if([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]) {
         
         __block UIBackgroundTaskIdentifier background_task;

+ 2 - 0
iOSClient/CCGlobal.h

@@ -322,6 +322,8 @@
 
 // Notification Center
 
+#define k_notificationCenter_applicationDidEnterBackground  @"applicationDidEnterBackground"
+
 #define k_notificationCenter_initializeMain             @"initializeMain"
 #define k_notificationCenter_setTitleMain               @"setTitleMain"
 #define k_notificationCenter_clearDateReadDataSource    @"clearDateReadDataSource"