From 011d997840a95a45294ce44036bf3aee7642285c Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Mon, 16 Oct 2017 10:30:14 +0700 Subject: [PATCH] Sign iOS dylibs before packaging These changes allow to open the exported project in XCode and Run it immediately to begin debugging. Before these changes you'd have to sign GDNative libs and change Build Configuration manually. --- .../xcshareddata/xcschemes/godot_ios.xcscheme | 10 +++++----- platform/iphone/export/export.cpp | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme b/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme index 3f0df5c4379..b6beeb012fe 100644 --- a/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme +++ b/misc/dist/ios_xcode/godot_ios.xcodeproj/xcshareddata/xcschemes/godot_ios.xcscheme @@ -23,7 +23,7 @@ @@ -42,7 +42,7 @@ + buildConfiguration = "Debug"> diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index 5216dc5d6a2..0507ef19d66 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -592,7 +592,15 @@ Error EditorExportPlatformIOS::export_project(const Ref &p_p return err; #ifdef OSX_ENABLED - ep.step("Making .xcarchive", 2); + ep.step("Code-signing dylibs", 2); + DirAccess *dylibs_dir = DirAccess::open(dest_dir + "dylibs"); + ERR_FAIL_COND_V(!dylibs_dir, ERR_CANT_OPEN); + CodesignData codesign_data(p_preset, p_debug); + err = _walk_dir_recursive(dylibs_dir, _codesign, &codesign_data); + memdelete(dylibs_dir); + ERR_FAIL_COND_V(err, err); + + ep.step("Making .xcarchive", 3); String archive_path = p_path.get_basename() + ".xcarchive"; List archive_args; archive_args.push_back("-project"); @@ -611,14 +619,6 @@ Error EditorExportPlatformIOS::export_project(const Ref &p_p err = OS::get_singleton()->execute("xcodebuild", archive_args, true); ERR_FAIL_COND_V(err, err); - ep.step("Code-signing dylibs", 3); - DirAccess *dylibs_dir = DirAccess::open(archive_path + "/Products/Applications/" + binary_name + ".app/dylibs"); - ERR_FAIL_COND_V(!dylibs_dir, ERR_CANT_OPEN); - CodesignData codesign_data(p_preset, p_debug); - err = _walk_dir_recursive(dylibs_dir, _codesign, &codesign_data); - memdelete(dylibs_dir); - ERR_FAIL_COND_V(err, err); - ep.step("Making .ipa", 4); List export_args; export_args.push_back("-exportArchive");