Detailed Member Reference

Namespace: Canley.Utility.Notifications
Class: CanleyNotificationService

Initialise

public static void Initialise()
  • Description: Requests the necessary iOS permissions (Alert, Badge, and Sound) from the user. This should be called once during your application’s initial boot sequence.

  • Workflow:

    1. OS Handshake: Triggers the native Apple authorization dialog on physical iOS devices.
    2. Editor Safety: Bypasses native calls in the Unity Editor and logs a diagnostic message to prevent platform errors.
  • Return Type: void

  • Access: Public Static

  • Example:

using Canley.Utility.Notifications;
using UnityEngine;
 
public class GameBootstrap : MonoBehaviour 
{
    private void Start() 
    {
        // Requests permissions from the user immediately upon boot
        CanleyNotificationService.Initialise();
    }
}

TIP

You do not need to manually check authorization status before scheduling notifications. If a user declines the prompt, the operating system simply silences the alerts automatically while your application code remains clean and unchanged.