LifeCycleListener.h 919 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. // important app life-cycle events
  3. @protocol LifeCycleListener<NSObject>
  4. @optional
  5. - (void)didFinishLaunching:(NSNotification*)notification;
  6. - (void)didBecomeActive:(NSNotification*)notification;
  7. - (void)willResignActive:(NSNotification*)notification;
  8. - (void)didEnterBackground:(NSNotification*)notification;
  9. - (void)willEnterForeground:(NSNotification*)notification;
  10. - (void)willTerminate:(NSNotification*)notification;
  11. - (void)unityDidUnload:(NSNotification*)notification;
  12. - (void)unityDidQuit:(NSNotification*)notification;
  13. @end
  14. void UnityRegisterLifeCycleListener(id<LifeCycleListener> obj);
  15. void UnityUnregisterLifeCycleListener(id<LifeCycleListener> obj);
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. extern __attribute__((visibility("default"))) NSString* const kUnityDidUnload;
  20. extern __attribute__((visibility("default"))) NSString* const kUnityDidQuit;
  21. #ifdef __cplusplus
  22. } // extern "C"
  23. #endif