Native System Events

With the Native System Events API you can subscribe to the iOS events listed bellow.

Available actions list:

public Action OnApplicationDidEnterBackground	 = delegate {};
public Action OnApplicationDidBecomeActive = delegate {};
public Action OnApplicationDidReceiveMemoryWarning = delegate {};
public Action OnApplicationWillResignActive = delegate {};
public Action OnApplicationWillTerminate = delegate {};

Note: Before you can subscribe to the listed action you need to call subscribe method, in order to activate native listener.


Using example:


void Awake() {
    IOSNativeAppEvents.OnApplicationDidReceiveMemoryWarning += OnApplicationDidReceiveMemoryWarning;
    IOSNativeAppEvents.OnApplicationDidBecomeActive += HandleOnApplicationDidBecomeActive;


private void OnApplicationDidBecomeActive() {
    // Called when application become active again. Optionally refresh the user interface, check for some data than probably was chenged wile application was paused
    Debug.Log ("Received  OnApplicationDidBecomeActive event");

private void OnApplicationDidReceiveMemoryWarning() {
    //Called application receives a memory warning from the system.
    Debug.Log ("Received  OnApplicationDidReceiveMemoryWarning event");