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

Add ability to receive iOS APNS notifications #10633

Open
theromis opened this issue Sep 2, 2024 · 0 comments
Open

Add ability to receive iOS APNS notifications #10633

theromis opened this issue Sep 2, 2024 · 0 comments

Comments

@theromis
Copy link

theromis commented Sep 2, 2024

Describe the project you are working on

Working on iOS game

Describe the problem or limitation you are having in your project

Currently iOS godot can't register/receive APNS notifications

Describe the feature / enhancement and how it helps to overcome the problem or limitation

By getting APNS notifications will bring more people for game, especially particular events

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Current AppDelegate implementation doesn't have didRegisterForRemoteNotificationsWithDeviceToken
handler https://github.com/godotengine/godot/blob/master/platform/ios/app_delegate.mm#L69

below is swift portion of currently working implementation:

   func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
       let tokenParts = deviceToken.map { data in String(format: "%02.2hhx", data) }
       let token = tokenParts.joined()
       os_log(.debug, "didRegisterForRemoteNotificationsWithDeviceToken: \(token)")
       apnsTokenRegister(token: token)
   }

If this enhancement will not be used often, can it be worked around with a few lines of script?

Unfortunately APNS is a part of AppDelegate

Is there a reason why this should be core and not an add-on in the asset library?

APNS is a core for iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants