Ejemplo n.º 1
0
        public static void ScheduleLocalNotification(iOSNotificationWithUserInfo data)
        {
#if UNITY_IOS && !UNITY_EDITOR
            data.data.userInfo = iOSNotificationsWrapper.CsDictionaryToObjC(data.userInfo);
            _ScheduleLocalNotification(data.data);
#endif
        }
Ejemplo n.º 2
0
        static iOSNotificationWithUserInfo[] MarshalAndFreeNotificationDataArray(IntPtr ptr, int count)
        {
            if (count == 0 || ptr == IntPtr.Zero)
            {
                return(null);
            }

            var dataArray  = new iOSNotificationWithUserInfo[count];
            var structSize = Marshal.SizeOf(typeof(iOSNotificationData));
            var next       = ptr;

            for (var i = 0; i < count; ++i)
            {
                dataArray[i].data        = (iOSNotificationData)Marshal.PtrToStructure(next, typeof(iOSNotificationData));
                dataArray[i].userInfo    = NSDictionaryToCs(dataArray[i].data.userInfo);
                dataArray[i].attachments = AttachmentsNSArrayToCs(dataArray[i].data.attachments);
                next = next + structSize;
            }
            _FreeUnmanagediOSNotificationDataArray(ptr, count);

            return(dataArray);
        }
Ejemplo n.º 3
0
        internal static void OnSentNotification(iOSNotificationWithUserInfo data)
        {
            var notification = new iOSNotification(data);

            s_OnNotificationReceived(notification);
        }