electron: [Bug]: "Bundle identifier mismatch" error on APN token register

Preflight Checklist

Electron Version

23.2.1

What operating system are you using?

macOS

Operating System Version

macOS Monterey

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Expected Behavior

request to APNS should succeed.

Actual Behavior

request to APNS fails:

[Error: 13 NSOSStatusErrorDomain {
    NSDebugDescription = "Bundle identifier mismatch";
}]

Testcase Gist URL

https://gist.github.com/JoeHossam/d4b585c21f78752a5bc6f90a38a27b4e

Additional Information

I want to provide a push notification certificate. I want to know where does the code read the appId from. so I can set it correctly Please provide more details in the documentation. Thank you.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Bump

I got this working! Thank you @JCBsystem.

@ddenis-k sure i use it in signed mas build but i guess the key is that it need to be a signed build with the right entitlements and provisionprofile

you need these in you entitlements <key>com.apple.developer.aps-environment</key> <string>development | production</string>

and when you create your provisionprofile make sure you have push certs created to your app identity even if you dont use them to send push messages with (i use a apn pushkey) think this was what made it work for me Screenshot 2023-11-30 at 09 51 12

then it shuld work let me know if you need more help