From 118df3f7bb5fb05cb5a54b34a14069744be5e697 Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Fri, 15 Nov 2024 09:40:41 -0800 Subject: [PATCH 01/16] fix: add visionOS support --- AnalyticsConnector.xcodeproj/project.pbxproj | 8 ++++---- Package.swift | 5 +++-- scripts/build_framework.sh | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/AnalyticsConnector.xcodeproj/project.pbxproj b/AnalyticsConnector.xcodeproj/project.pbxproj index 316bb18..8b50eae 100644 --- a/AnalyticsConnector.xcodeproj/project.pbxproj +++ b/AnalyticsConnector.xcodeproj/project.pbxproj @@ -270,12 +270,12 @@ PRODUCT_BUNDLE_IDENTIFIER = com.amplitude.AnalyticsConnector; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator"; SUPPORTS_MACCATALYST = YES; SWIFT_INSTALL_OBJC_HEADER = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4,6"; + TARGETED_DEVICE_FAMILY = "1,2,3,4,6,7"; TVOS_DEPLOYMENT_TARGET = 9.0; WATCHOS_DEPLOYMENT_TARGET = 3.0; }; @@ -304,11 +304,11 @@ PRODUCT_BUNDLE_IDENTIFIER = com.amplitude.AnalyticsConnector; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator"; SUPPORTS_MACCATALYST = YES; SWIFT_INSTALL_OBJC_HEADER = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,3,4,6"; + TARGETED_DEVICE_FAMILY = "1,2,3,4,6,7"; TVOS_DEPLOYMENT_TARGET = 9.0; WATCHOS_DEPLOYMENT_TARGET = 3.0; }; diff --git a/Package.swift b/Package.swift index 9517235..a5d612d 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.9 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -9,7 +9,8 @@ let package = Package( .iOS(.v10), .macOS(.v10_13), .tvOS(.v9), - .watchOS(.v3) + .watchOS(.v3), + .visionOS(.v1), ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. diff --git a/scripts/build_framework.sh b/scripts/build_framework.sh index 4ed7967..02616b5 100755 --- a/scripts/build_framework.sh +++ b/scripts/build_framework.sh @@ -6,7 +6,7 @@ SCHEME="AnalyticsConnector" FRAMEWORK="AnalyticsConnector" BUILD_DIR="./.build/artifacts" OUTPUT_PATH="$BUILD_DIR/$FRAMEWORK.xcframework" -PLATFORMS=("iOS" "iOS Simulator" "macOS" "macOS Cataylst" "watchOS" "watchOS Simulator" "tvOS" "tvOS Simulator") +PLATFORMS=("iOS" "iOS Simulator" "macOS" "macOS Cataylst" "watchOS" "watchOS Simulator" "tvOS" "tvOS Simulator" "visionOS" "visionOS Simulator") build_framework_with_configuration_and_name() { CONFIGURATION=${1} From 7d9461199f0050b3d6a652c86b7069dee5dc5cca Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 11:51:48 -0800 Subject: [PATCH 02/16] add visionos support to podspec --- AnalyticsConnector.podspec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AnalyticsConnector.podspec b/AnalyticsConnector.podspec index f786707..f3b98e2 100644 --- a/AnalyticsConnector.podspec +++ b/AnalyticsConnector.podspec @@ -24,6 +24,9 @@ Pod::Spec.new do |spec| spec.watchos.deployment_target = '3.0' spec.watchos.source_files = 'sources/AnalyticsConnector/**/*.{h,swift}' + spec.visionos.deployment_target = '1.0' + spec.visionos.source_files = 'sources/AnalyticsConnector/**/*.{h,swift}' + spec.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } end From 6c4027d79dbbc7f91440dd8d7808c6717895944c Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 16:31:08 -0800 Subject: [PATCH 03/16] add an separate swift package file --- Package.swift | 3 +-- Package@swift-5.9.swift | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 Package@swift-5.9.swift diff --git a/Package.swift b/Package.swift index a5d612d..697c443 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.7 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -10,7 +10,6 @@ let package = Package( .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. diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift new file mode 100644 index 0000000..a5d612d --- /dev/null +++ b/Package@swift-5.9.swift @@ -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"]), + ] +) From 2c4f36af71beff541fccfd17f3e945a50a8b5ad5 Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 16:33:21 -0800 Subject: [PATCH 04/16] restore Package.swift --- Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 697c443..9517235 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription @@ -9,7 +9,7 @@ let package = Package( .iOS(.v10), .macOS(.v10_13), .tvOS(.v9), - .watchOS(.v3), + .watchOS(.v3) ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. From 9537a39f972b9244db5a3a0c537a3ca7bda8afb1 Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 17:23:29 -0800 Subject: [PATCH 05/16] add prerelease link replacement for Package@swift-5.9.swift --- release.config.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/release.config.js b/release.config.js index 86c511b..8af21ea 100644 --- a/release.config.js +++ b/release.config.js @@ -51,11 +51,25 @@ module.exports = { ], "countMatches": true }, + { + "files": ["Package@swift-5.9.swift"], + "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": "Package@swift-5.9.swift", + "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", "Package@swift-5.9.swift"], "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" }], ["@semantic-release/exec", { From 828fa09c4f5a4a58d4fc672416e94e6cd9b20d7e Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 17:29:22 -0800 Subject: [PATCH 06/16] fix for github workflow --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b315497..991d409 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -97,7 +97,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/" Package@swift-5.9.swift + - name: Semantic Release --dry-run if: ${{ github.event.inputs.dryRun == 'true'}} From 22c38c15c7f71d2c6fa643a740e4d81c9b747677 Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 18:09:33 -0800 Subject: [PATCH 07/16] add visionos support for UT --- .github/workflows/test.yml | 20 ++++++++++++++++++-- AnalyticsConnector.xcodeproj/project.pbxproj | 14 ++++++++------ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3287051..c57019e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,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: | @@ -41,6 +41,14 @@ jobs: -sdk appletvsimulator \ -destination 'platform=tvOS Simulator,name=Apple TV' \ + - name: xrOS Build + run: | + xcodebuild \ + -project AnalyticsConnector.xcodeproj \ + -scheme AnalyticsConnector \ + -sdk xrsimulator \ + -destination 'platform=visionOS Simulator,name=Apple Vision Pro' \ + - name: iOS Tests run: | xcodebuild test \ @@ -67,3 +75,11 @@ 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 diff --git a/AnalyticsConnector.xcodeproj/project.pbxproj b/AnalyticsConnector.xcodeproj/project.pbxproj index 8b50eae..6b2ca2a 100644 --- a/AnalyticsConnector.xcodeproj/project.pbxproj +++ b/AnalyticsConnector.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 55; objects = { /* Begin PBXBuildFile section */ @@ -13,7 +13,7 @@ 2001756927728E16001C341D /* IdentityStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2001756827728E16001C341D /* IdentityStore.swift */; }; 2001756F2773B679001C341D /* EventBridgeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2001756E2773B679001C341D /* EventBridgeTests.swift */; }; 200175752773D888001C341D /* IdentityStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 200175742773D888001C341D /* IdentityStoreTests.swift */; }; - 20C47A8E297A674F0084AC03 /* AnalyticsConnector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 200174A52771569E001C341D /* AnalyticsConnector.framework */; }; + 20C47A8E297A674F0084AC03 /* AnalyticsConnector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 200174A52771569E001C341D /* AnalyticsConnector.framework */; platformFilters = (ios, macos, tvos, xros, ); }; 20C9FAB1278CB1C000A4D530 /* ObjectiveCTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 20C9FAB0278CB1C000A4D530 /* ObjectiveCTests.m */; }; 20C9FAD4278CBFAC00A4D530 /* AnalyticsConnector.h in Headers */ = {isa = PBXBuildFile; fileRef = 20866C9B27714900003D1705 /* AnalyticsConnector.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ @@ -331,11 +331,12 @@ MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = com.amplitude.AnalyticsConnectorTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTS_MACCATALYST = NO; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,3,6"; + TARGETED_DEVICE_FAMILY = "1,2,3,6,7"; TVOS_DEPLOYMENT_TARGET = 10.0; }; name = Debug; @@ -357,10 +358,11 @@ MACOSX_DEPLOYMENT_TARGET = 10.13; PRODUCT_BUNDLE_IDENTIFIER = com.amplitude.AnalyticsConnectorTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator"; + SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTS_MACCATALYST = NO; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,3,6"; + TARGETED_DEVICE_FAMILY = "1,2,3,6,7"; TVOS_DEPLOYMENT_TARGET = 10.0; }; name = Release; From 0b89026cf4e34de5a58ed00cd9bc4a2ac8e269cb Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 18:17:03 -0800 Subject: [PATCH 08/16] update --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 991d409..e77d46e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,6 +58,14 @@ jobs: -sdk appletvsimulator \ -destination 'platform=tvOS Simulator,name=Apple TV' \ + - name: xrOS 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,15 @@ 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 + - name: Validate Podfile run: pod lib lint --allow-warnings From e9d69cd43ddd5d3b380c6d26f3f1f1a072ce882f Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 18:40:30 -0800 Subject: [PATCH 09/16] set cocopods version to latest for pod lint --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e77d46e..f5e0f30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: | @@ -100,6 +100,11 @@ jobs: -sdk xrsimulator \ -destination 'platform=visionOS Simulator,name=Apple Vision Pro' \ test + + - name: Setup Cocoapods + uses: maxim-lobanov/setup-cocoapods@v1.4.0 + with: + cocoapods-version: latest - name: Validate Podfile run: pod lib lint --allow-warnings From eadf0ac1c5d0c223ce75a2a81830465ef82bd803 Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 18:52:22 -0800 Subject: [PATCH 10/16] fix github workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5e0f30..c62400d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,7 +104,7 @@ jobs: - name: Setup Cocoapods uses: maxim-lobanov/setup-cocoapods@v1.4.0 with: - cocoapods-version: latest + version: latest - name: Validate Podfile run: pod lib lint --allow-warnings From 1436a69ca8d44ca7ec1860544c7fec10bd4f2b6f Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 20:50:52 -0800 Subject: [PATCH 11/16] testing github workflow --- .github/workflows/release.yml | 141 +++++++++++++++++----------------- 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c62400d..f374bfb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,77 +34,78 @@ jobs: run: | sudo xcode-select -switch /Applications/Xcode_15.4.app - - name: iOS Build - run: | - xcodebuild \ - -project AnalyticsConnector.xcodeproj \ - -scheme AnalyticsConnector \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' - - - name: macOS Build - run: | - xcodebuild \ - -project AnalyticsConnector.xcodeproj \ - -scheme AnalyticsConnector \ - -sdk macosx \ - -destination 'platform=macosx' \ - - - name: tvOS Build - run: | - xcodebuild \ - -project AnalyticsConnector.xcodeproj \ - -scheme AnalyticsConnector \ - -sdk appletvsimulator \ - -destination 'platform=tvOS Simulator,name=Apple TV' \ - - - name: xrOS Build - run: | - xcodebuild \ - -project AnalyticsConnector.xcodeproj \ - -scheme AnalyticsConnector \ - -sdk xrsimulator \ - -destination 'platform=visionOS Simulator,name=Apple Vision Pro' \ - - - name: iOS Tests - run: | - xcodebuild test \ - -project AnalyticsConnector.xcodeproj \ - -scheme AnalyticsConnector \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' - - - name: macOS Tests - run: | - xcodebuild \ - -project AnalyticsConnector.xcodeproj \ - -scheme AnalyticsConnector \ - -sdk macosx \ - -destination 'platform=macosx' \ - test - - - name: tvOS Tests - run: | - xcodebuild \ - -project AnalyticsConnector.xcodeproj \ - -scheme AnalyticsConnector \ - -sdk appletvsimulator \ - -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 + # - name: iOS Build + # run: | + # xcodebuild \ + # -project AnalyticsConnector.xcodeproj \ + # -scheme AnalyticsConnector \ + # -sdk iphonesimulator \ + # -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' + + # - name: macOS Build + # run: | + # xcodebuild \ + # -project AnalyticsConnector.xcodeproj \ + # -scheme AnalyticsConnector \ + # -sdk macosx \ + # -destination 'platform=macosx' \ + + # - name: tvOS Build + # run: | + # xcodebuild \ + # -project AnalyticsConnector.xcodeproj \ + # -scheme AnalyticsConnector \ + # -sdk appletvsimulator \ + # -destination 'platform=tvOS Simulator,name=Apple TV' \ + + # - name: xrOS Build + # run: | + # xcodebuild \ + # -project AnalyticsConnector.xcodeproj \ + # -scheme AnalyticsConnector \ + # -sdk xrsimulator \ + # -destination 'platform=visionOS Simulator,name=Apple Vision Pro' \ + + # - name: iOS Tests + # run: | + # xcodebuild test \ + # -project AnalyticsConnector.xcodeproj \ + # -scheme AnalyticsConnector \ + # -sdk iphonesimulator \ + # -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' + + # - name: macOS Tests + # run: | + # xcodebuild \ + # -project AnalyticsConnector.xcodeproj \ + # -scheme AnalyticsConnector \ + # -sdk macosx \ + # -destination 'platform=macosx' \ + # test + + # - name: tvOS Tests + # run: | + # xcodebuild \ + # -project AnalyticsConnector.xcodeproj \ + # -scheme AnalyticsConnector \ + # -sdk appletvsimulator \ + # -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 + + - name: Show Installed Simulators + run: xcrun simctl list - - name: Setup Cocoapods - uses: maxim-lobanov/setup-cocoapods@v1.4.0 - with: - version: latest + - name: Validate Podfile + run: pod --version - name: Validate Podfile run: pod lib lint --allow-warnings From 160a19f525755a5ac633ec67f7e534102c46814d Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 20:57:16 -0800 Subject: [PATCH 12/16] testing github workflow --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f374bfb..70adc28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,6 +107,14 @@ jobs: - name: Validate Podfile run: pod --version + - name: Setup Cocoapods + uses: maxim-lobanov/setup-cocoapods@v1.4.0 + with: + version: latest + + - name: Validate Podfile after reinstall + run: pod --version + - name: Validate Podfile run: pod lib lint --allow-warnings From 48ffc1e68171ade8dc2aad0017c17edf2301842e Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 21:18:13 -0800 Subject: [PATCH 13/16] testing github workflow --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70adc28..f3b6bf9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,6 +101,12 @@ jobs: # -destination 'platform=visionOS Simulator,name=Apple Vision Pro' \ # test + - name: Show Installed Simulators + run: xcrun simctl list + + - name: Install missing Simulators + run: sudo xcodebuild -installAdditionalComponents + - name: Show Installed Simulators run: xcrun simctl list From 5a40dc232fa11b0eefff259614ea43216dce1421 Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Mon, 18 Nov 2024 21:24:31 -0800 Subject: [PATCH 14/16] testing github workflow --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3b6bf9..aaa59ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,11 +105,14 @@ jobs: run: xcrun simctl list - name: Install missing Simulators - run: sudo xcodebuild -installAdditionalComponents + run: xcodebuild -downloadAllPlatforms - name: Show Installed Simulators run: xcrun simctl list + - name: Show Installed Simulators + run: xcodebuild -showsdks + - name: Validate Podfile run: pod --version From 442c879973a6afec21aea9cb0a7a317d5a2b1a16 Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Tue, 19 Nov 2024 10:05:18 -0800 Subject: [PATCH 15/16] test cocoapods version --- .github/workflows/release.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aaa59ed..2a9eae8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,8 +104,9 @@ jobs: - name: Show Installed Simulators run: xcrun simctl list - - name: Install missing Simulators - run: xcodebuild -downloadAllPlatforms + # remove this step after update the os runner to 15 + - name: Install visionOS simulator + run: xcodebuild -downloadPlatform visionOS - name: Show Installed Simulators run: xcrun simctl list @@ -116,10 +117,10 @@ jobs: - name: Validate Podfile run: pod --version - - name: Setup Cocoapods - uses: maxim-lobanov/setup-cocoapods@v1.4.0 - with: - version: latest + # - name: Setup Cocoapods + # uses: maxim-lobanov/setup-cocoapods@v1.4.0 + # with: + # version: latest - name: Validate Podfile after reinstall run: pod --version From 676e3b5ed213a05b84eedd6c3e70d494cb2b5f8e Mon Sep 17 00:00:00 2001 From: Jin Xu Date: Tue, 19 Nov 2024 10:14:35 -0800 Subject: [PATCH 16/16] cleanup --- .github/workflows/release.yml | 155 +++++++++++++++------------------- .github/workflows/test.yml | 2 +- 2 files changed, 69 insertions(+), 88 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a9eae8..ff5e5e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,96 +34,77 @@ jobs: run: | sudo xcode-select -switch /Applications/Xcode_15.4.app - # - name: iOS Build - # run: | - # xcodebuild \ - # -project AnalyticsConnector.xcodeproj \ - # -scheme AnalyticsConnector \ - # -sdk iphonesimulator \ - # -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' - - # - name: macOS Build - # run: | - # xcodebuild \ - # -project AnalyticsConnector.xcodeproj \ - # -scheme AnalyticsConnector \ - # -sdk macosx \ - # -destination 'platform=macosx' \ - - # - name: tvOS Build - # run: | - # xcodebuild \ - # -project AnalyticsConnector.xcodeproj \ - # -scheme AnalyticsConnector \ - # -sdk appletvsimulator \ - # -destination 'platform=tvOS Simulator,name=Apple TV' \ - - # - name: xrOS Build - # run: | - # xcodebuild \ - # -project AnalyticsConnector.xcodeproj \ - # -scheme AnalyticsConnector \ - # -sdk xrsimulator \ - # -destination 'platform=visionOS Simulator,name=Apple Vision Pro' \ - - # - name: iOS Tests - # run: | - # xcodebuild test \ - # -project AnalyticsConnector.xcodeproj \ - # -scheme AnalyticsConnector \ - # -sdk iphonesimulator \ - # -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' - - # - name: macOS Tests - # run: | - # xcodebuild \ - # -project AnalyticsConnector.xcodeproj \ - # -scheme AnalyticsConnector \ - # -sdk macosx \ - # -destination 'platform=macosx' \ - # test - - # - name: tvOS Tests - # run: | - # xcodebuild \ - # -project AnalyticsConnector.xcodeproj \ - # -scheme AnalyticsConnector \ - # -sdk appletvsimulator \ - # -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 - - - name: Show Installed Simulators - run: xcrun simctl list - - # remove this step after update the os runner to 15 - - name: Install visionOS simulator - run: xcodebuild -downloadPlatform visionOS + - name: iOS Build + run: | + xcodebuild \ + -project AnalyticsConnector.xcodeproj \ + -scheme AnalyticsConnector \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' - - name: Show Installed Simulators - run: xcrun simctl list - - - name: Show Installed Simulators - run: xcodebuild -showsdks - - - name: Validate Podfile - run: pod --version + - name: macOS Build + run: | + xcodebuild \ + -project AnalyticsConnector.xcodeproj \ + -scheme AnalyticsConnector \ + -sdk macosx \ + -destination 'platform=macosx' \ - # - name: Setup Cocoapods - # uses: maxim-lobanov/setup-cocoapods@v1.4.0 - # with: - # version: latest + - name: tvOS Build + run: | + xcodebuild \ + -project AnalyticsConnector.xcodeproj \ + -scheme AnalyticsConnector \ + -sdk appletvsimulator \ + -destination 'platform=tvOS Simulator,name=Apple TV' \ - - name: Validate Podfile after reinstall - run: pod --version + - 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 \ + -project AnalyticsConnector.xcodeproj \ + -scheme AnalyticsConnector \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.5' + + - name: macOS Tests + run: | + xcodebuild \ + -project AnalyticsConnector.xcodeproj \ + -scheme AnalyticsConnector \ + -sdk macosx \ + -destination 'platform=macosx' \ + test + + - name: tvOS Tests + run: | + xcodebuild \ + -project AnalyticsConnector.xcodeproj \ + -scheme AnalyticsConnector \ + -sdk appletvsimulator \ + -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c57019e..008ee4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: -sdk appletvsimulator \ -destination 'platform=tvOS Simulator,name=Apple TV' \ - - name: xrOS Build + - name: visionOS Build run: | xcodebuild \ -project AnalyticsConnector.xcodeproj \