mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:55:42 +00:00
Ensure iOS platform before TestFlight archive (#8656)
This commit is contained in:
@@ -46,6 +46,45 @@ fi
|
||||
SCHEME="Unity-iPhone"
|
||||
echo "Using scheme: $SCHEME"
|
||||
|
||||
# Xcode can be upgraded on a self-hosted runner before its matching iOS platform
|
||||
# component is installed. In that state, xcrun may exist but the generic iOS
|
||||
# destination is ineligible, and archive fails with exit code 70. Probe the exact
|
||||
# destination used below and repair the Xcode installation before starting the
|
||||
# expensive archive.
|
||||
if ! xcodebuild \
|
||||
-project "$XCODEPROJ" \
|
||||
-scheme "$SCHEME" \
|
||||
-showBuildSettings \
|
||||
-destination "generic/platform=iOS" >/dev/null; then
|
||||
echo "The generic iOS destination is unavailable; installing Xcode's iOS platform..."
|
||||
|
||||
if ! xcodebuild -checkFirstLaunchStatus; then
|
||||
echo "Completing pending Xcode first-launch setup..."
|
||||
xcodebuild -runFirstLaunch
|
||||
fi
|
||||
|
||||
xcodebuild -downloadPlatform iOS
|
||||
fi
|
||||
|
||||
echo "Installed Xcode SDKs:"
|
||||
xcodebuild -showsdks
|
||||
IOS_SDK_PATH=$(xcrun --sdk iphoneos --show-sdk-path)
|
||||
if [ ! -d "$IOS_SDK_PATH" ]; then
|
||||
echo "Error: Xcode reported an invalid iOS SDK path: $IOS_SDK_PATH"
|
||||
exit 1
|
||||
fi
|
||||
echo "Using iOS SDK: $IOS_SDK_PATH"
|
||||
|
||||
if ! xcodebuild \
|
||||
-project "$XCODEPROJ" \
|
||||
-scheme "$SCHEME" \
|
||||
-showBuildSettings \
|
||||
-destination "generic/platform=iOS" >/dev/null; then
|
||||
echo "Error: The generic iOS destination is still unavailable after platform setup."
|
||||
xcodebuild -project "$XCODEPROJ" -scheme "$SCHEME" -showdestinations || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Archive without signing - we'll sign during export
|
||||
# This avoids issues with provisioning profiles on framework targets
|
||||
xcodebuild archive \
|
||||
|
||||
Reference in New Issue
Block a user