diff --git a/modules/share/godot_share_data.h b/modules/share/godot_share_data.h index 913f28b70a9e..9b64067f346c 100644 --- a/modules/share/godot_share_data.h +++ b/modules/share/godot_share_data.h @@ -43,6 +43,7 @@ class GodotShareData : public RefCounted { public: void share(const String &p_text, const String &p_subject, const String &p_title, const String &p_path); + void rate(); GodotShareData(); ~GodotShareData(); diff --git a/modules/share/godot_share_data.mm b/modules/share/godot_share_data.mm index 9dfb66d5498f..d91258cded7a 100644 --- a/modules/share/godot_share_data.mm +++ b/modules/share/godot_share_data.mm @@ -32,6 +32,8 @@ #import "app_delegate.h" +#import + GodotShareData *GodotShareData::singleton = nullptr; GodotShareData::GodotShareData() { @@ -70,6 +72,13 @@ [root_controller presentViewController:avc animated:YES completion:nil]; } +void GodotShareData::rate() { + if (@available(iOS 10.3, *)) { + [SKStoreReviewController requestReview]; + } +} + void GodotShareData::_bind_methods() { ClassDB::bind_method(D_METHOD("share", "text", "subject", "title", "path"), &GodotShareData::share); + ClassDB::bind_method(D_METHOD("rate"), &GodotShareData::rate); } diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index 3b1a534daf28..fa8abfebd385 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -133,6 +133,7 @@ static const char *android_perms[] = { "MANAGE_APP_TOKENS", "MANAGE_DOCUMENTS", "MANAGE_EXTERNAL_STORAGE", + "MANAGE_GAME_MODE", "MASTER_CLEAR", "MEDIA_CONTENT_CONTROL", "MODIFY_AUDIO_SETTINGS",