iOS Export: Add a method to embed a framework

By default 'add_ios_framework' would not embed a framework to save previous behavior.
New 'add_ios_embedded_framework' would embed framework on export.
This commit is contained in:
Sergey Minakov
2020-08-05 21:03:05 +03:00
parent c2a4ce9380
commit 910c554a1a
4 changed files with 49 additions and 24 deletions

View File

@@ -555,10 +555,18 @@ void EditorExportPlugin::add_ios_framework(const String &p_path) {
ios_frameworks.push_back(p_path);
}
void EditorExportPlugin::add_ios_embedded_framework(const String &p_path) {
ios_embedded_frameworks.push_back(p_path);
}
Vector<String> EditorExportPlugin::get_ios_frameworks() const {
return ios_frameworks;
}
Vector<String> EditorExportPlugin::get_ios_embedded_frameworks() const {
return ios_embedded_frameworks;
}
void EditorExportPlugin::add_ios_plist_content(const String &p_plist_content) {
ios_plist_content += p_plist_content + "\n";
}
@@ -640,6 +648,7 @@ void EditorExportPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_ios_project_static_lib", "path"), &EditorExportPlugin::add_ios_project_static_lib);
ClassDB::bind_method(D_METHOD("add_file", "path", "file", "remap"), &EditorExportPlugin::add_file);
ClassDB::bind_method(D_METHOD("add_ios_framework", "path"), &EditorExportPlugin::add_ios_framework);
ClassDB::bind_method(D_METHOD("add_ios_embedded_framework", "path"), &EditorExportPlugin::add_ios_embedded_framework);
ClassDB::bind_method(D_METHOD("add_ios_plist_content", "plist_content"), &EditorExportPlugin::add_ios_plist_content);
ClassDB::bind_method(D_METHOD("add_ios_linker_flags", "flags"), &EditorExportPlugin::add_ios_linker_flags);
ClassDB::bind_method(D_METHOD("add_ios_bundle_file", "path"), &EditorExportPlugin::add_ios_bundle_file);