Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
philprime committed Jul 9, 2024
1 parent 53a732e commit 8c7a280
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ jobs:
name: Publish Release
runs-on: macos-latest
steps:
- name: Prepare macOS
run: |
defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
xcodebuild -downloadPlatform visionOS
- name: Checkout Repository
uses: actions/checkout@v4

Expand All @@ -34,5 +28,5 @@ jobs:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
TPPDF.sha256
TPPDF.zip
archives/TPPDF.zip
archives/TPPDF.sha256
25 changes: 24 additions & 1 deletion scripts/create-xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ set -o pipefail
ARCHIVES_PATH="$(pwd)/archives"
OUTPUT_XCFRAMEWORK_PATH="$ARCHIVES_PATH/TPPDF.xcframework"

echo "Available SDKs:"
xcodebuild -showsdks

echo "Available Destinations:"
xcodebuild -showdestinations -project TPPDF.xcodeproj -scheme TPPDF

echo "Available Simulators:"
xcrun simctl list devices

echo "Selected SDK Info:"
echo " - Path: $(xcrun -show-sdk-path)"
echo " - Version: $(xcrun -show-sdk-version)"
echo " - Build Version: $(xcrun -show-sdk-build-version)"
echo " - Platform Path: $(xcrun -show-sdk-platform-path)"
echo " - Platform Version: $(xcrun -show-sdk-platform-version)"

# 1. Archive the Swift Package for each platform
echo "Building XCFramework for iOS"
xcodebuild archive \
Expand Down Expand Up @@ -66,7 +82,7 @@ xcodebuild archive \
-scheme TPPDF \
-destination "generic/platform=visionOS Simulator" \
-archivePath "$ARCHIVES_PATH/TPPDF-visionOS-Simulator.xcarchive" \
-sdk xros \
-sdk xrsimulator \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcbeautify

Expand Down Expand Up @@ -97,8 +113,15 @@ xcodebuild -create-xcframework \
# 3. Create a ZIP and a SHA256 hash
echo "Creating ZIP archive"
ditto -c -k --keepParent $OUTPUT_XCFRAMEWORK_PATH $ARCHIVES_PATH/TPPDF.zip

echo "Creating SHA256 hash"
sha256sum $ARCHIVES_PATH/TPPDF.zip >$ARCHIVES_PATH/TPPDF.sha256

# 4. Summary
echo "XCFramework created at $OUTPUT_XCFRAMEWORK_PATH"
echo "ZIP archive created at $ARCHIVES_PATH/TPPDF.zip"
echo "SHA256 hash created at $ARCHIVES_PATH/TPPDF.sha256"

# -- End Script --

# Return to original working directory
Expand Down

0 comments on commit 8c7a280

Please sign in to comment.