Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VisionOS Support for Carthage #3565

Merged
merged 7 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ jobs:

build-xcframework:
name: Build XCFramework
runs-on: macos-13
# The macos-13 uses an Intel processor and doesn't compile the XCFramework for visionOS.
# The large image compiles on arm64 and successfully creates the XCFramework for visionOS.
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v4
- run: ./scripts/ci-select-xcode.sh 15.0.1
- run: ./scripts/ci-select-xcode.sh 15.2
- run: make build-xcframework
shell: sh

Expand All @@ -116,14 +118,14 @@ jobs:

validate-xcframework:
name: Validate XCFramework
runs-on: macos-13
runs-on: macos-13-xlarge
needs: build-xcframework
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}
- run: ./scripts/ci-select-xcode.sh 15.0.1
- run: ./scripts/ci-select-xcode.sh 15.2
- run: make build-xcframework-sample
shell: sh

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: no-commit-to-branch

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.1
rev: 0.27.3
hooks:
- id: check-github-actions
- id: check-github-workflows
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Features

- Send debug meta for app start transactions (#3543)
- Add VisionOS Support for Carthage (#3565)

### Fixes

Expand Down
1 change: 1 addition & 0 deletions Sources/Configuration/DeploymentTargets.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ MACOSX_DEPLOYMENT_TARGET = 10.13
IPHONEOS_DEPLOYMENT_TARGET = 11.0
WATCHOS_DEPLOYMENT_TARGET = 4.0
TVOS_DEPLOYMENT_TARGET = 11.0
XROS_DEPLOYMENT_TARGET = 1.0
19 changes: 0 additions & 19 deletions Sources/Configuration/SDK.xcconfig
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
#include "DeploymentTargets.xcconfig"

SDKROOT = $(SDKROOT__CARTHAGE_$(CARTHAGE)) // basically, iphoneos (unless «CARTHAGE» == «YES»)
// Carthage relies on this assumption, years standing — that SDKROOT is default or explicitly
// set to `macosx` (or equivalent) under the ‘single target, multiple platform’ paradigm
// because of a xcodebuild bug involving the sdk flag and implicit dependency: see «Carthage/Carthage#347».
SDKROOT__CARTHAGE_YES = macosx
// Importantly, the below two lines appease «Xcode.app», and get the UI to show Mac Catalyst destinations.
SDKROOT__CARTHAGE_NO = iphoneos
SDKROOT__CARTHAGE_ = iphoneos
// …in order for ‘single target, multiple platform’ extrapolations to hold true,
// all the above relies on the ability of Xcode GUI, xcodebuild, and Carthage via xcodebuild to
// override «SDKROOT» based on selected destination (particularly for appletv* and watchos* platforms.)
// …if the override behavior ever breaks, expect weird output and the probable need to migrate away from
// the ‘single target, multiple platform’ paradigm.

// …`SUPPORTED_PLATFORMS`, in service of ‘single target, multiple platform’ extrapolation, must never
// engage in dollar-parentheses syntax — unless that dollar-parentheses basis is
// entirely non-platform–derived, e.g. based upon `XCODE_VERSION_MAJOR`.
// Note: Carthage, unfortunately, as current of v0.34.0 queries rather harshly on the platform values below
// ⋯ quite early in the process, queried values not compiled into Carthage will cause hard errors.
SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator watchos watchsimulator appletvos appletvsimulator xros xrsimulator
TARGETED_DEVICE_FAMILY = 1,2,3,4,7
SKIP_INSTALL = YES
Expand Down