From 26edfa593ff2cac36b8b154206716ee6957f81c8 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 21 Apr 2025 17:59:24 +0300 Subject: [PATCH] fix(ci/cd): build tf --- Build-tf | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/Build-tf b/Build-tf index 19a2aa9a..b697d11b 100644 --- a/Build-tf +++ b/Build-tf @@ -42,6 +42,33 @@ cd .. rm -rf "${RESULT_BUNDLE_PATH}" "${DERIVED_DATA_PATH}" mkdir -p "${ARTIFACT_PATH}" +function resign_frameworks() { + local identity="Apple Distribution: ITVIO, OOO (VL68C36HYS)" + local app_path="${ARCHIVE_PATH}/Products/Applications/Runner.app" + local frameworks_path="${app_path}/Frameworks" + + echo "🔐 Removing old signatures..." + codesign --remove-signature "${frameworks_path}/App.framework/App" + codesign --remove-signature "${frameworks_path}/Flutter.framework/Flutter" + + echo "🔐 Resigning App.framework..." + codesign -f --deep --no-strict -s "${identity}" \ + --preserve-metadata=entitlements,identifier,flags \ + "${frameworks_path}/App.framework/App" + + echo "🔐 Resigning Flutter.framework..." + codesign -f --deep --no-strict -s "${identity}" \ + --preserve-metadata=entitlements,identifier,flags \ + "${frameworks_path}/Flutter.framework/Flutter" + + echo "🔐 Resigning Runner.app..." + codesign -f --deep --no-strict -s "${identity}" \ + --preserve-metadata=entitlements,identifier,flags \ + "${app_path}" + + echo "✅ Resigning completed" +} + # Archive the build xcrun xcodebuild \ -workspace "${WORKSPACE}" \ @@ -59,14 +86,7 @@ xcrun xcodebuild \ DEVELOPMENT_TEAM=VL68C36HYS \ archive || { echo "Xcode archive failed"; exit 1; } -codesign --remove-signature "${ARCHIVE_PATH}/Products/Applications/Runner.app/Frameworks/App.framework/App" -codesign --remove-signature "${ARCHIVE_PATH}/Products/Applications/Runner.app/Frameworks/Flutter.framework/Flutter" - -codesign -f -s "Apple Distribution: ITVIO, OOO (VL68C36HYS)" --preserve-metadata=entitlements,identifier,flags \ - "${ARCHIVE_PATH}/Products/Applications/Runner.app/Frameworks/App.framework/App" - -codesign -f -s "Apple Distribution: ITVIO, OOO (VL68C36HYS)" --preserve-metadata=entitlements,identifier,flags \ - "${ARCHIVE_PATH}/Products/Applications/Runner.app/Frameworks/Flutter.framework/Flutter" +resign_frameworks # Export the build to .ipa xcrun xcodebuild \