Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
ARCHIVE_DIR="$HOME/archives"
XCFRAMEWORK_DIR="$HOME/Ambiently.xcframework"
rm -rf $ARCHIVE_DIR
rm -rf $XCFRAMEWORK_DIR
xcodebuild archive \
-scheme AmbientlyTouch \
-destination "generic/platform=iOS Simulator" \
-archivePath "$ARCHIVE_DIR/AmbientlyKit-iOS_Simulator" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive \
-scheme AmbientlyTouch \
-destination "generic/platform=iOS" \
-archivePath "$ARCHIVE_DIR/AmbientlyKit-iOS" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive \
-scheme AmbientlyTouch \
-destination "generic/platform=macOS,variant=Mac Catalyst" \
-archivePath "$ARCHIVE_DIR/AmbientlyKit-Catalyst" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive \
-scheme AmbientlyKit \
-destination "generic/platform=macOS" \
-archivePath "$ARCHIVE_DIR/AmbientlyKit-macOS" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework \
-framework $ARCHIVE_DIR/AmbientlyKit-iOS.xcarchive/Products/Library/Frameworks/AmbientlyKit.framework \
-framework $ARCHIVE_DIR/AmbientlyKit-iOS_Simulator.xcarchive/Products/Library/Frameworks/AmbientlyKit.framework \
-framework $ARCHIVE_DIR/AmbientlyKit-Catalyst.xcarchive/Products/Library/Frameworks/AmbientlyKit.framework \
-framework $ARCHIVE_DIR/AmbientlyKit-macOS.xcarchive/Products/Library/Frameworks/AmbientlyKit.framework \
-output $XCFRAMEWORK_DIR
rm -rf $ARCHIVE_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.