@@ -336,16 +336,6 @@ build_for_arch() {
336336 SPM_CACHE_DIR=" ${HOME} /.spm-cache"
337337 mkdir -p " $SPM_CACHE_DIR "
338338
339- # Use CI entitlements (without iCloud) during build to avoid provisioning
340- # profile requirement. The app is re-signed with real entitlements after build.
341- local ci_entitlements=" TablePro/TablePro.ci.entitlements"
342- local real_entitlements=" TablePro/TablePro.entitlements"
343- if [ -f " $ci_entitlements " ]; then
344- echo " 📋 Using CI entitlements (iCloud stripped for build)..."
345- cp " $real_entitlements " " $real_entitlements .bak"
346- cp " $ci_entitlements " " $real_entitlements "
347- fi
348-
349339 # Build with xcodebuild
350340 echo " Running xcodebuild..."
351341 if ! xcodebuild \
@@ -355,9 +345,12 @@ build_for_arch() {
355345 -arch " $arch " \
356346 ONLY_ACTIVE_ARCH=YES \
357347 CODE_SIGN_IDENTITY=" $SIGN_IDENTITY " \
358- CODE_SIGN_STYLE=Manual \
359348 DEVELOPMENT_TEAM=" $TEAM_ID " \
360349 ${ANALYTICS_HMAC_SECRET: +ANALYTICS_HMAC_SECRET=" $ANALYTICS_HMAC_SECRET " } \
350+ -allowProvisioningUpdates \
351+ ${ASC_KEY_ID: +-authenticationKeyID " $ASC_KEY_ID " } \
352+ ${ASC_ISSUER_ID: +-authenticationKeyIssuerID " $ASC_ISSUER_ID " } \
353+ ${ASC_KEY_ID: +-authenticationKeyPath " $HOME /private_keys/AuthKey_${ASC_KEY_ID} .p8" } \
361354 -skipPackagePluginValidation \
362355 -clonedSourcePackagesDirPath " $SPM_CACHE_DIR " \
363356 build 2>&1 | tee " build-${arch} .log" ; then
@@ -367,11 +360,6 @@ build_for_arch() {
367360 fi
368361 echo " ✅ Build succeeded for $arch "
369362
370- # Restore real entitlements
371- if [ -f " $real_entitlements .bak" ]; then
372- mv " $real_entitlements .bak" " $real_entitlements "
373- fi
374-
375363 # Get binary path with validation
376364 DERIVED_DATA=$( echo " $build_settings " | grep -m 1 " BUILD_DIR" | awk ' {print $3}' )
377365
@@ -517,8 +505,8 @@ build_for_arch() {
517505 done
518506 fi
519507
520- # Sign the app bundle last (with real entitlements including iCloud)
521- codesign -fs " $SIGN_IDENTITY " --force --options runtime --timestamp --entitlements " $real_entitlements " " $BUILD_DIR /$OUTPUT_NAME "
508+ # Sign the app bundle last
509+ codesign -fs " $SIGN_IDENTITY " --force --options runtime --timestamp --entitlements " TablePro/TablePro.entitlements " " $BUILD_DIR /$OUTPUT_NAME "
522510 echo " ✅ Code signing complete"
523511
524512 # Verify signature
0 commit comments