Any way to do Push Notifications?

Couldn’t find anything for unity on visionos push notifications - only for ios mobile.

Any plans on implementing this?

@mtschoen
Followed this guide Push Notifications SDK
And used this block of code:

async void Start()
    {
        await UnityServices.InitializeAsync();

        PushNotificationsService.Instance.OnRemoteNotificationReceived += PushNotificationRecieved;

        // Note: This is the minimum required to ensure the events with the push notification data are sent correctly through Analytics.
        // In a real game you would need to handle privacy consent states here, see the Analytics documentation for more details:
        // https://docs.unity.com/ugs/en-us/manual/analytics/manual/manage-data-privacy
        AnalyticsService.Instance.StartDataCollection();

        // Make sure to set the required settings in Project Settings before testing
        string token = await PushNotificationsService.Instance.RegisterForPushNotificationsAsync();
        Debug.Log($"The push notification token is {token}");
    }

    void PushNotificationRecieved(Dictionary<string, object> notificationData)
    {
        Debug.Log("Notification received!");
        foreach (KeyValuePair<string, object> item in notificationData)
        {
            Debug.Log($"Notification data item: {item.Key} - {item.Value}");
        }
    }

When I run in the app, I get an error

Push notifications are not available on this platform.
Unity.Services.PushNotifications.UnsupportedPlatformLogic:RegisterForPushNotifications(PushNotificationSettings)
Unity.Services.PushNotifications.d__14:MoveNext()
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(TStateMachine&)
Unity.Services.PushNotifications.PushNotificationsServiceInstance:RegisterForPushNotificationsAsync()
d__0:MoveNext()
System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(TStateMachine&)
TP_PushNotificationsManager:Start()

Exception: Failed to register the device for remote notifications.
at Unity.Services.PushNotifications.PushNotificationsServiceInstance.RegisterForPushNotificationsAsync () [0x00000] in <00000000000000000000000000000000>:0

Added notifications to signing and capabilities but its still not working. Is there a timeline to get notifications working?

Hi there! Unfortunately this integration (and UGS integrations in general) don’t support visionOS yet. We’re working on getting resources behind this but for now we don’t have a timeline for when visionOS will be supported.

Please head over to the visionOS roadmap and submit an “idea” for push notification support so that we can weigh this against other feature requests. Thanks!