Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question iOS - Exception: Failed to register the device for remote notifications.

Discussion in 'Player Engagement' started by ErdionerAPDEV, Sep 26, 2023.

  1. ErdionerAPDEV

    ErdionerAPDEV

    Joined:
    Aug 30, 2023
    Posts:
    8
    Hello!

    I have been trying to add push notifications to iOS for a few days now without much success. At one point I got it to work, got a token but couldn't send a test notification to the device and now I cannot get the token at all due to the exception in the title. I have searched around without any success and am rather limited in what I can try on my own due to my lack of familiarity with iOS development.

    I created an empty project and have been using an old app in the Apple Developer Console in an attempt to isolate and freely play around with it without luck.

    Android has been working for a while now, so it's just iOS that I have had issues with.
     
  2. jacobbev

    jacobbev

    Unity Technologies

    Joined:
    Jun 25, 2018
    Posts:
    8
    Hello! Sorry to hear you've been running into issues. You mind answering a few questions to help us troubleshoot further. If you find any of this information sensitive and would rather send it as a DM or by opening a support ticket that works as well.
    • What project is seeing this issue?
      • organization id
      • project id
      • environment id
      • campaign id (or link to the campaign)
    • What Unity version is being used?
    • What package version is being used?
      • What other package versions have been deployed / may be out in the wild? (if applicable)
    • Are you using google / apple / both?
      • What version of iOS / Android are you seeing this problem with?
     
  3. ErdionerAPDEV

    ErdionerAPDEV

    Joined:
    Aug 30, 2023
    Posts:
    8
    • What project is seeing this issue?
      • organization id: 5772896456205
      • project id: 70d72645-0cca-4f7b-ac31-52b8524be2d9
      • environment id: 4eb2d440-6624-4be4-b603-84ab3d4d123e
      • campaign id (or link to the campaign): I am not aware of a campaign
    • Unity version: 2021.3.10
    • Package version: 4.0.0-pre.1
    • Are you using google / apple / both: Both as far as I am aware
      • iOS version: 16.6.1
     
  4. vd_unity

    vd_unity

    Unity Technologies

    Joined:
    Sep 11, 2014
    Posts:
    30
    Hey @ErdionerAPDEV ,
    Sorry for a bit late response!
    We managed to reproduce the set-up for the push notification for the iPhone 15 Simulator, and were able to see the notification as well as the corresponding events in the dashboard (Analytics -> Event Browser).

    Screenshot 2023-10-03 at 08.22.36.png

    Screenshot 2023-10-03 at 08.36.25.png

    For our test app, we followed the steps outlined here:

    https://docs.unity.com/ugs/en-us/manual/push-notifications/manual/get-started
    https://docs.unity.com/ugs/manual/push-notifications/manual/use-push-notifications

    as well as the implementation
    https://docs.unity.com/ugs/en-us/manual/push-notifications/manual/sdk


    Please let us know if your setup maybe diverged in some way, and it would be helpful if you could provide us with the userId and/or deviceId, so we could look your events up, and see if they are valid and if they are reaching the database.
    One of the nuances regarding the process when you have a new device, is that it takes some time (cca 3-4 hrs) for new device to propagate to database, therefore you might not see the events in the event browser immediately.

    If you know your deviceId, one of the quick ways to test the push is to go to LiveOps -> Push Notifications -> Settings on your dashboard and make a quick "Send Test", which bypasses the database and sends the notification to the corresponding device.
    Screenshot 2023-10-03 at 08.49.06.png
    Screenshot 2023-10-03 at 08.35.15.png

    Please let us know if this helps