public static void ScheduleLocalNotification(iOSNotificationWithUserInfo data) { #if UNITY_IOS && !UNITY_EDITOR data.data.userInfo = iOSNotificationsWrapper.CsDictionaryToObjC(data.userInfo); _ScheduleLocalNotification(data.data); #endif }
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); }
internal static void OnSentNotification(iOSNotificationWithUserInfo data) { var notification = new iOSNotification(data); s_OnNotificationReceived(notification); }