8000 Fix issue when archiving catalyst · fermoya/SwiftUIPager@eb824ff · GitHub
[go: up one dir, main page]

Skip to content

Commit eb824ff

Browse files
committed
Fix issue when archiving catalyst
1 parent 7f9b866 commit eb824ff

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

scripts/build_xcframework.sh

+18-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ rm $XCFRAMEWORK_ZIP_PATH
1212

1313
SCHEMES=( SwiftUIPager_Catalyst SwiftUIPager_macOS SwiftUIPager_iOS SwiftUIPager_watchOS SwiftUIPager_tvOS )
1414
PLATFORMS=(
15-
"platform=macOS,variant=Mac Catalyst"
15+
""
1616
"platform=macOS"
1717
"generic/platform=iOS;generic/platform=iOS Simulator"
1818
"generic/platform=watchOS;generic/platform=watchOS Simulator"
@@ -28,18 +28,27 @@ ARCHIVES=(
2828

2929
COMMAND="xcodebuild -create-xcframework "
3030
xcodebuild clean -project $PROJ_PATH
31+
3132
for i in ${!SCHEMES[@]}; do
3233
IFS=";" read -r -a PLATFORM <<< "${PLATFORMS[i]}"
3334
IFS=";" read -r -a ARCHIVE <<< "${ARCHIVES[i]}"
34-
35-
for j in ${!PLATFORM[@]}; do
35+
36+
for j in ${!ARCHIVE[@]}; do
3637
ARCHIVE_PATH="$FRAMEWORKS_PATH/${ARCHIVE[$j]}"
37-
xcodebuild archive -scheme ${SCHEMES[$i]} \
38-
-project $PROJ_PATH \
39-
-destination "${PLATFORM[$j]}" \
40-
-archivePath $ARCHIVE_PATH \
41-
SKIP_INSTALL=NO \
42-
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcpretty
38+
if [ -z "${PLATFORM[$j]}"]; then
39+
xcodebuild archive -scheme ${SCHEMES[$i]} \
40+
-project $PROJ_PATH \
41+
-archivePath $ARCHIVE_PATH \
42+
SKIP_INSTALL=NO \
43+
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcpretty
44+
else
45+
xcodebuild archive -scheme ${SCHEMES[$i]} \
46+
-project $PROJ_PATH \
47+
-destination "${PLATFORM[$j]}" \
48+
-archivePath $ARCHIVE_PATH \
49+
SKIP_INSTALL=NO \
50+
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcpretty
51+
fi
4352

4453
COMMAND="$COMMAND -framework $ARCHIVE_PATH/Products/Library/Frameworks/$LIB_NAME.framework"
4554
done

0 commit comments

Comments
 (0)
0