Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Push Notifications guide outdated and incomplete #561

Open
kevinfoley opened this issue Jun 26, 2024 · 1 comment
Open

iOS Push Notifications guide outdated and incomplete #561

kevinfoley opened this issue Jun 26, 2024 · 1 comment
Assignees
Labels
Health Triaged Triaged within product health

Comments

@kevinfoley
Copy link

The documentation for setting up push notifications on iOS has several issues:

  1. The example code uses a deprecated Unity API, UnityEngine.iOS.NotificationServices.RegisterForNotifications(). New projects should use the Mobile Notifications package
  2. The tutorial cannot be followed in a cross-platform application that implements Push Notifications on Android. The PlayFab documentation for Android push notifications directs us to use Firebase Cloud Messaging (FCM). If the FCM plugin is installed, on iOS it hijacks the normal notification APIs via swizzling. When we attempt to request user authorization to display notifications, we get an error "Attempting to complete future before FCM initialized."

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@thomasgu thomasgu added the Health Triaged Triaged within product health label Jul 1, 2024
@anjekan
Copy link

anjekan commented Nov 26, 2024

we are very emergency about this ios push deprecated in unity 2022.3.53f1
If there is any possible alternative, please let me know.

because of our request, publisher started using Playfab. While positive opinions about Playfab are coming out, iOS push problem makes publisher feel not good. I hope an alternative comes out as soon as possible. Thank you.

is req.DeviceToken at below codes can be used in RegisterForIOSPushNotificationRequest?

IEnumerator RequestAuthorization()
{
var authorizationOption = AuthorizationOption.Alert | AuthorizationOption.Badge;
using (var req = new AuthorizationRequest(authorizationOption, true))
{
while (!req.IsFinished)
{
yield return null;
};

    string res = "\n RequestAuthorization:";
    res += "\n finished: " + req.IsFinished;
    res += "\n granted :  " + req.Granted;
    res += "\n error:  " + req.Error;
    res += "\n deviceToken:  " + req.DeviceToken;
    Debug.Log(res);
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Health Triaged Triaged within product health
Projects
None yet
Development

No branches or pull requests

4 participants