File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -336,6 +336,16 @@ build_for_arch() {
336336 SPM_CACHE_DIR=" ${HOME} /.spm-cache"
337337 mkdir -p " $SPM_CACHE_DIR "
338338
339+ # Detect provisioning profile UUID for iCloud entitlements
340+ local PROFILE_SPECIFIER=" "
341+ PROFILE_PATH=$( find ~ /Library/MobileDevice/Provisioning\ Profiles -name " *.provisionprofile" -print -quit 2> /dev/null)
342+ if [ -n " ${PROFILE_PATH:- } " ]; then
343+ PROFILE_SPECIFIER=$( /usr/libexec/PlistBuddy -c " Print UUID" /dev/stdin <<< " $(security cms -D -i " $PROFILE_PATH " 2>/dev/null)" || true)
344+ if [ -n " $PROFILE_SPECIFIER " ]; then
345+ echo " 📋 Using provisioning profile: $PROFILE_SPECIFIER "
346+ fi
347+ fi
348+
339349 # Build with xcodebuild
340350 echo " Running xcodebuild..."
341351 if ! xcodebuild \
@@ -347,6 +357,7 @@ build_for_arch() {
347357 CODE_SIGN_IDENTITY=" $SIGN_IDENTITY " \
348358 CODE_SIGN_STYLE=Manual \
349359 DEVELOPMENT_TEAM=" $TEAM_ID " \
360+ ${PROFILE_SPECIFIER: +PROVISIONING_PROFILE_SPECIFIER=" $PROFILE_SPECIFIER " } \
350361 ${ANALYTICS_HMAC_SECRET: +ANALYTICS_HMAC_SECRET=" $ANALYTICS_HMAC_SECRET " } \
351362 -skipPackagePluginValidation \
352363 -clonedSourcePackagesDirPath " $SPM_CACHE_DIR " \
You can’t perform that action at this time.
0 commit comments