//--------------------------------------
    // INITIALIZE
    //--------------------------------------


    void Awake()
    {
        DontDestroyOnLoad(gameObject);

                #if (UNITY_IOS && PUSH_ENABLED && !UNITY_EDITOR) || SA_DEBUG_MODE
        if (UnityEngine.iOS.NotificationServices.remoteNotificationCount > 0)
        {
            string alertBody         = UnityEngine.iOS.NotificationServices.remoteNotifications [0].alertBody;
            ISN_RemoteNotification n = new ISN_RemoteNotification(alertBody);
            _LaunchNotification = n;

            UnityEngine.iOS.NotificationServices.ClearRemoteNotifications();
        }
                #endif
    }
    //--------------------------------------
    // INITIALIZE
    //--------------------------------------


    protected override void Awake()
    {
        base.Awake();

                #if (UNITY_IOS && PUSH_ENABLED && !UNITY_EDITOR && UNITY_5) || SA_DEBUG_MODE
        if (UnityEngine.iOS.NotificationServices.remoteNotificationCount > 0)
        {
            string alertBody         = UnityEngine.iOS.NotificationServices.remoteNotifications [0].alertBody;
            ISN_RemoteNotification n = new ISN_RemoteNotification(alertBody);
            _LaunchNotification = n;

            UnityEngine.iOS.NotificationServices.ClearRemoteNotifications();
        }
                #endif
    }
    //--------------------------------------
    // INITIALIZE
    //--------------------------------------


    void Awake()
    {
        ISN_LocalNotificationsController.OnLocalNotificationReceived += HandleOnLocalNotificationReceived;



        //Checking for a local launch notification
        if (ISN_LocalNotificationsController.Instance.LaunchNotification != null)
        {
            ISN_LocalNotification notification = ISN_LocalNotificationsController.Instance.LaunchNotification;

            IOSMessage.Create("Launch Notification", "Messgae: " + notification.Message + "\nNotification Data: " + notification.Data);
        }


        //Checking for a remote launch notification
        if (ISN_RemoteNotificationsController.Instance.LaunchNotification != null)
        {
            ISN_RemoteNotification notification = ISN_RemoteNotificationsController.Instance.LaunchNotification;

            IOSMessage.Create("Launch Remote Notification", "Body: " + notification.Body);
        }
    }
    //--------------------------------------
    // INITIALIZE
    //--------------------------------------


    void Awake()
    {
        ISN_LocalNotificationsController.OnLocalNotificationReceived += HandleOnLocalNotificationReceived;



        NotificationCenter.OnWillPresentNotification += (NotificationRequest obj) => {
            Debug.Log("OnWillPresentNotification: " + obj.Content);
        };

        var launchNotification = NotificationCenter.LaunchNotification;

        if (launchNotification.Content != null)
        {
            IOSMessage.Create("Launch Notification", "Messgae: " + launchNotification.Content + "\nNotification ID: " + launchNotification.Id);
        }



        //Checking for a local launch notification
        if (ISN_LocalNotificationsController.Instance.LaunchNotification != null)
        {
            ISN_LocalNotification notification = ISN_LocalNotificationsController.Instance.LaunchNotification;

            IOSMessage.Create("Launch Notification", "Messgae: " + notification.Message + "\nNotification Data: " + notification.Data);
        }


        //Checking for a remote launch notification
        if (ISN_RemoteNotificationsController.Instance.LaunchNotification != null)
        {
            ISN_RemoteNotification notification = ISN_RemoteNotificationsController.Instance.LaunchNotification;

            IOSMessage.Create("Launch Remote Notification", "Body: " + notification.Body);
        }
    }
    private void DidReceiveRemoteNotification(string notificationBody)
    {
        ISN_RemoteNotification notif = new ISN_RemoteNotification(notificationBody);

        OnRemoteNotificationReceived(notif);
    }