godot icon indicating copy to clipboard operation
godot copied to clipboard

APNS token signal and variable

Open theromis opened this issue 1 year ago • 3 comments

Initial approach for APNS token processing proposal https://github.com/godotengine/godot-proposals/issues/10633

In scripts it should look something like:

func register_rest_apns_token(token):
    http.post("https://example.com/test_token", "{\"apns_token\": \""+token+"\"}")

func _ready():
    if apns_token_changed:
        apns_token_changed.connect(register_rest_apns_token)
    if apns_token and apns_token != "":
        register_rest_apns_token(apns_token)

PS: same implementation I have for Android FCM notifications, it might be part of the same logic/module e.t.c.

theromis avatar Sep 07 '24 19:09 theromis

@fire seems I was wrong with declaring property apns_token and signal apns_token_changed for iOS only (in editor attempt to reach it gives an error), looks like it should be somewhere in OS context, but what the right approach? Can somebody lead me?

theromis avatar Oct 04 '24 05:10 theromis

I am not that familiar but it seems related to hardware device id. Theres a method to fetch that maybe this will fit there too

fire avatar Oct 05 '24 01:10 fire

@fire I think will add godot module named "notification" with this var and notification

theromis avatar Oct 05 '24 07:10 theromis