void AppDelegate_MessageReceived(object sender, UserInfoEventArgs e)
 {
     if (e.MessageType == MessageType.Data)
     {
         HandleDataMessage(e.UserInfo);
     }
     else
     {
         HandleNotificationMessage(e.UserInfo);
     }
 }
        void HandleMessage(NSDictionary message)
        {
            if (MessageReceived == null)
            {
                return;
            }

            MessageType messageType;

            if (message.ContainsKey(new NSString("aps")))
            {
                messageType = MessageType.Notification;
            }
            else
            {
                messageType = MessageType.Data;
            }

            var e = new UserInfoEventArgs(message, messageType);

            MessageReceived(this, e);
        }