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

[4.0] [iOS] Pluggable application delegate #43556

Merged

Conversation

naithar
Copy link
Contributor

@naithar naithar commented Nov 15, 2020

Extension for new iOS plugin system implemented in #41230 which allows to extend default UIAppDelegate with specific plugin functionality without swizzling.

Push notification example

Plugin repo: https://github.com/naithar/godot_ios_plugin_apns

Usage:

func _ready():
	print("start")
	if Engine.has_singleton("APNS"):
		print("connecting apns")
		apns = Engine.get_singleton("APNS")
		apns.connect("device_address_changed", self, "_on_device_address")
		apns.register_push_notifications()
	
func _on_device_address(device_address):
	print(device_address)

Result:

@akien-mga akien-mga merged commit e5dfb9b into godotengine:master Nov 16, 2020
@akien-mga
Copy link
Member

Thanks!

@naithar naithar deleted the feature/pluggable_app_delegates branch November 16, 2020 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants