diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index 5de1b5f66a..169d8baa6d 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -68,6 +68,15 @@ This is called when the customization process for scenes ends. + + + + + + This is called after Xcode project generation, but before it is built. + [b]Note:[/b] Only supported on iOS and visionOS. + + diff --git a/editor/export/editor_export_platform_apple_embedded.cpp b/editor/export/editor_export_platform_apple_embedded.cpp index 5e322768c5..54142c5700 100644 --- a/editor/export/editor_export_platform_apple_embedded.cpp +++ b/editor/export/editor_export_platform_apple_embedded.cpp @@ -2058,6 +2058,12 @@ Error EditorExportPlatformAppleEmbedded::_export_project_helper(const Refsupports_platform(Ref(this))) { + export_plugins[i]->end_generate_apple_embedded_project(p_path, export_project_only); + } + } + if (export_project_only) { return OK; } diff --git a/editor/export/editor_export_plugin.cpp b/editor/export/editor_export_plugin.cpp index fd58ba39a7..9b8dbb8d08 100644 --- a/editor/export/editor_export_plugin.cpp +++ b/editor/export/editor_export_plugin.cpp @@ -331,6 +331,16 @@ void EditorExportPlugin::_export_begin(const HashSet &p_features, bool p void EditorExportPlugin::_export_end() {} +void EditorExportPlugin::_end_generate_apple_embedded_project(const String &p_path, bool p_p_will_build_archive) {} + +void EditorExportPlugin::end_generate_apple_embedded_project(const String &p_path, bool p_will_build_archive) { + if (GDVIRTUAL_IS_OVERRIDDEN(_end_generate_apple_embedded_project)) { + GDVIRTUAL_CALL(_end_generate_apple_embedded_project, p_path, p_will_build_archive); + } else { + _end_generate_apple_embedded_project(p_path, p_will_build_archive); + } +} + void EditorExportPlugin::skip() { skipped = true; } @@ -367,6 +377,7 @@ void EditorExportPlugin::_bind_methods() { GDVIRTUAL_BIND(_export_file, "path", "type", "features"); GDVIRTUAL_BIND(_export_begin, "features", "is_debug", "path", "flags"); GDVIRTUAL_BIND(_export_end); + GDVIRTUAL_BIND(_end_generate_apple_embedded_project, "path", "will_build_archive"); GDVIRTUAL_BIND(_begin_customize_resources, "platform", "features"); GDVIRTUAL_BIND(_customize_resource, "resource", "path"); diff --git a/editor/export/editor_export_plugin.h b/editor/export/editor_export_plugin.h index 2b7ec0879a..d9b2a9252f 100644 --- a/editor/export/editor_export_plugin.h +++ b/editor/export/editor_export_plugin.h @@ -112,12 +112,14 @@ protected: virtual void _export_file(const String &p_path, const String &p_type, const HashSet &p_features); virtual void _export_begin(const HashSet &p_features, bool p_debug, const String &p_path, int p_flags); virtual void _export_end(); + virtual void _end_generate_apple_embedded_project(const String &p_path, bool p_will_build_archive); static void _bind_methods(); GDVIRTUAL3(_export_file, String, String, Vector) GDVIRTUAL4(_export_begin, Vector, bool, String, uint32_t) GDVIRTUAL0(_export_end) + GDVIRTUAL2(_end_generate_apple_embedded_project, const String &, bool) GDVIRTUAL2RC(bool, _begin_customize_resources, const Ref &, const Vector &) GDVIRTUAL2R_REQUIRED(Ref, _customize_resource, const Ref &, String) @@ -172,6 +174,8 @@ public: virtual bool supports_platform(const Ref &p_export_platform) const; PackedStringArray get_export_features(const Ref &p_export_platform, bool p_debug) const; + void end_generate_apple_embedded_project(const String &p_path, bool p_will_build_archive); + virtual PackedStringArray get_android_dependencies(const Ref &p_export_platform, bool p_debug) const; virtual PackedStringArray get_android_dependencies_maven_repos(const Ref &p_export_platform, bool p_debug) const; virtual PackedStringArray get_android_libraries(const Ref &p_export_platform, bool p_debug) const;