ably-js icon indicating copy to clipboard operation
ably-js copied to clipboard

Web Push deviceRegistration fails on iOS simulator

Open distante opened this issue 5 months ago • 2 comments

Reproduction

  1. Open iOS Simulator with any iOS 18 version
  2. go to your web/localhost app
  3. Instal it as PWA
  4. Open PWA
  5. Try to register the device for push notifications

Expectation

The registration is successful

Reliability

The registration fails because targetUrl and encryptionKey are not correctly generated

{
    "id": "01K****EDITED****",
    "deviceSecret": "01K1WF4QF8SZME23EWQ2DT3QNH",
    "platform": "browser",
    "formFactor": "desktop",
    "deviceIdentityToken": null,
    "push": {
        "recipient": {
            "transportType": "web",
            "targetUrl": "",
            "publicVapidKey": "BM-****EDITED****",
            "encryptionKey": {
                "p256dh": "",
                "auth": ""
            }
        }
    }
}

The same works on browser and android emulators.

If needed I can provide a test URL in private.

┆Issue is synchronized with this Jira Task by Unito

distante avatar Aug 05 '25 06:08 distante

Hey @distante,

Sorry for the delay. We looked into this, and unfortunately it appears to be an iOS emulator limitation. We couldn’t find any documentation on this behavior, as there’s almost no documentation on PWA support in the emulator.

If you know of any workaround to enable or test web push on the iOS emulator, please share it! we’ll take a look and, if feasible, consider implementing it.

ttypic avatar Aug 19 '25 15:08 ttypic

I stopped testing in iOS and just trusted it works. 🙈

On a real device works.

distante avatar Aug 19 '25 16:08 distante