fix(ci/cd): build tf

This commit is contained in:
mso7nueh
2025-04-21 17:59:24 +03:00
parent a2af0365dc
commit 26edfa593f

View File

@@ -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 \