Detailed Member Reference

Namespace: Canley.Utility.Notifications
Class: CanleyNotificationService

GetAllNotifications

public static List<CanleyNotificationRecord> GetAllNotifications()
  • Description: Queries the iOS Notification Center for all currently scheduled tasks and returns them as a list of records.

  • Workflow:

    1. Registry Scan: Queries the underlying platform notification queue to fetch every active pending notification item.
    2. Collection Mapping: Transforms the raw platform payloads into a clean List<CanleyNotificationRecord> structure for safe inspection.
  • Return Type: List<CanleyNotificationRecord>

  • Access: Public Static

  • Example:

using System.Collections.Generic;
using Canley.Utility.Notifications;
using UnityEngine;
 
public class NotificationManager : MonoBehaviour 
{
    public void LogAllScheduledAlerts() 
    {
        // Query all currently scheduled notification records
        List<CanleyNotificationRecord> allNotes = CanleyNotificationService.GetAllNotifications();
 
        foreach (var note in allNotes)
        {
            Debug.Log($"ID: {note.ID} | Title: {note.Title}");
        }
    }
}

TIP

GetAllNotifications returns a fresh list instance on every call, so avoid calling it repeatedly inside tight update loops to keep garbage collection overhead down.