-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add visionOS support * add visionos support to podspec * add an separate swift package file * fix for github workflow * add visionos support for UT * fix github workflow
- Loading branch information
Showing
7 changed files
with
120 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,9 +30,9 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Xcode 14.3.1 | ||
- name: Set Xcode 15.4 | ||
run: | | ||
sudo xcode-select -switch /Applications/Xcode_14.3.1.app | ||
sudo xcode-select -switch /Applications/Xcode_15.4.app | ||
- name: iOS Build | ||
run: | | ||
|
@@ -58,6 +58,14 @@ jobs: | |
-sdk appletvsimulator \ | ||
-destination 'platform=tvOS Simulator,name=Apple TV' \ | ||
- name: visionOS Build | ||
run: | | ||
xcodebuild \ | ||
-project AnalyticsConnector.xcodeproj \ | ||
-scheme AnalyticsConnector \ | ||
-sdk xrsimulator \ | ||
-destination 'platform=visionOS Simulator,name=Apple Vision Pro' \ | ||
- name: iOS Tests | ||
run: | | ||
xcodebuild test \ | ||
|
@@ -84,6 +92,20 @@ jobs: | |
-destination 'platform=tvOS Simulator,name=Apple TV' \ | ||
test | ||
- name: visionOS Tests | ||
run: | | ||
xcodebuild \ | ||
-project AnalyticsConnector.xcodeproj \ | ||
-scheme AnalyticsConnector \ | ||
-sdk xrsimulator \ | ||
-destination 'platform=visionOS Simulator,name=Apple Vision Pro' \ | ||
test | ||
# Install missing sdk for pod lint | ||
# Remove this step after the runner upgraded to macos-15 | ||
- name: Install visionOS simulator | ||
run: xcodebuild -downloadPlatform visionOS -quiet | ||
|
||
- name: Validate Podfile | ||
run: pod lib lint --allow-warnings | ||
|
||
|
@@ -97,7 +119,9 @@ jobs: | |
- name: Update Checksum | ||
run: | | ||
CHECKSUM=$(xcrun swift package compute-checksum .build/artifacts/AnalyticsConnector.xcframework.zip) && \ | ||
sed -i '' -E "s/(checksum: \")[^\"]*(\")/\1$CHECKSUM\2/" Package.swift | ||
sed -i '' -E "s/(checksum: \")[^\"]*(\")/\1$CHECKSUM\2/" Package.swift && \ | ||
sed -i '' -E "s/(checksum: \")[^\"]*(\")/\1$CHECKSUM\2/" [email protected] | ||
- name: Semantic Release --dry-run | ||
if: ${{ github.event.inputs.dryRun == 'true'}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// swift-tools-version:5.9 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "analytics-connector-ios", | ||
platforms: [ | ||
.iOS(.v10), | ||
.macOS(.v10_13), | ||
.tvOS(.v9), | ||
.watchOS(.v3), | ||
.visionOS(.v1), | ||
], | ||
products: [ | ||
// Products define the executables and libraries a package produces, and make them visible to other packages. | ||
.library( | ||
name: "AnalyticsConnector", | ||
targets: ["AnalyticsConnector"] | ||
), | ||
.library( | ||
name: "AnalyticsConnectorFramework", | ||
targets: ["AnalyticsConnectorFramework"] | ||
) | ||
], | ||
dependencies: [ | ||
// Dependencies declare other packages that this package depends on. | ||
], | ||
targets: [ | ||
// Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
.target( | ||
name: "AnalyticsConnector", | ||
path: "Sources/AnalyticsConnector", | ||
exclude: ["Info.plist"]), | ||
.binaryTarget(name: "AnalyticsConnectorFramework", | ||
url: "https://github.com/amplitude/analytics-connector-ios/releases/download/v1.2.4/AnalyticsConnector.xcframework.zip", | ||
checksum: "605073ac7b478d9bd5fad41505377f50f3d10250771435dd2f04003bcaf9c820"), | ||
.testTarget( | ||
name: "AnalyticsConnectorTests", | ||
dependencies: ["AnalyticsConnector"], | ||
path: "Tests/AnalyticsConnectorTests", | ||
exclude: ["Info.plist"]), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,11 +51,25 @@ module.exports = { | |
], | ||
"countMatches": true | ||
}, | ||
{ | ||
"files": ["[email protected]"], | ||
"from": "https://github.com/amplitude/analytics-connector-ios/releases/download/v.*/AnalyticsConnector.xcframework.zip", | ||
"to": "https://github.com/amplitude/analytics-connector-ios/releases/download/v${nextRelease.version}/AnalyticsConnector.xcframework.zip", | ||
"results": [ | ||
{ | ||
"file": "[email protected]", | ||
"hasChanged": true, | ||
"numMatches": 1, | ||
"numReplacements": 1 | ||
} | ||
], | ||
"countMatches": true | ||
}, | ||
] | ||
} | ||
], | ||
["@semantic-release/git", { | ||
"assets": ["AnalyticsConnector.podspec", "CHANGELOG.md", "Package.swift"], | ||
"assets": ["AnalyticsConnector.podspec", "CHANGELOG.md", "Package.swift", "[email protected]"], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
}], | ||
["@semantic-release/exec", { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters