diff --git a/.github/workflows/cocoapods.yml b/.github/workflows/cocoapods.yml index b6dcd92..77bee41 100644 --- a/.github/workflows/cocoapods.yml +++ b/.github/workflows/cocoapods.yml @@ -29,12 +29,16 @@ jobs: matrix: # watchOS fails linting when there are test, wedge in --skip-tests for # those runs. - PLATFORM: ["ios", "macos", "tvos", "watchos --skip-tests"] + PLATFORM: ["ios", "macos", "tvos", "visionos", "watchos --skip-tests"] CONFIGURATION: ["Debug", "Release"] steps: # The "macos-14" image defaults to 15.0.1, select the newer Xcode. - name: Xcode version run: sudo xcode-select -switch /Applications/Xcode_15.2.app + # The "macos-14" image has CocoaPods 1.14.x, and 1.15 is needed for visionOS + - name: Update CocoaPods + if: ${{ matrix.PLATFORM == 'visionos' }} + run: gem install cocoapods - uses: actions/checkout@v4 # Manually expanding out static frameworks to avoid making to many jobs. - name: Pod lib lint diff --git a/.github/workflows/swiftpm.yml b/.github/workflows/swiftpm.yml index bd06457..b65db9f 100644 --- a/.github/workflows/swiftpm.yml +++ b/.github/workflows/swiftpm.yml @@ -49,7 +49,7 @@ jobs: strategy: fail-fast: false matrix: - PLATFORM: ["ios", "macos", "tvos", "watchos"] + PLATFORM: ["ios", "macos", "tvos", "visionos", "watchos"] CONFIGURATION: ["Debug", "Release"] steps: # The "macos-14" image defaults to 15.0.1, select the newer Xcode. @@ -69,6 +69,9 @@ jobs: tvos) DESTINATION="platform=tvOS Simulator,name=Apple TV,OS=latest" ;; + visionos) + DESTINATION="platform=visionOS Simulator,name=Apple Vision Pro,OS=latest" + ;; watchos) DESTINATION="platform=WatchOS Simulator,name=Apple Watch Series 7 (45mm),OS=latest" ;; diff --git a/GTMSessionFetcher.podspec b/GTMSessionFetcher.podspec index 26ca268..6f5b05f 100644 --- a/GTMSessionFetcher.podspec +++ b/GTMSessionFetcher.podspec @@ -24,11 +24,13 @@ Pod::Spec.new do |s| ios_deployment_target = '10.0' osx_deployment_target = '10.12' tvos_deployment_target = '10.0' + visionos_deployment_target = '1.0' watchos_deployment_target = '6.0' s.ios.deployment_target = ios_deployment_target s.osx.deployment_target = osx_deployment_target s.tvos.deployment_target = tvos_deployment_target + s.visionos.deployment_target = visionos_deployment_target s.watchos.deployment_target = watchos_deployment_target s.prefix_header_file = false @@ -70,6 +72,7 @@ Pod::Spec.new do |s| :ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target, + :visionos => visionos_deployment_target, # Seem to need a higher min to get a good test runner picked/supported. :watchos => '7.4' } diff --git a/Sources/Core/GTMSessionFetcher.m b/Sources/Core/GTMSessionFetcher.m index 3599566..056c3f2 100644 --- a/Sources/Core/GTMSessionFetcher.m +++ b/Sources/Core/GTMSessionFetcher.m @@ -103,7 +103,8 @@ __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_13_0) || \ (TARGET_OS_WATCH && defined(__WATCHOS_6_0) && \ __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_6_0) || \ - (TARGET_OS_TV && defined(__TVOS_13_0) && __TVOS_VERSION_MIN_REQUIRED >= __TVOS_13_0)) + (TARGET_OS_TV && defined(__TVOS_13_0) && __TVOS_VERSION_MIN_REQUIRED >= __TVOS_13_0) || \ + (defined(TARGET_OS_VISION) && TARGET_OS_VISION)) #define GTM_SDK_REQUIRES_TLSMINIMUMSUPPORTEDPROTOCOLVERSION 1 #define GTM_SDK_SUPPORTS_TLSMINIMUMSUPPORTEDPROTOCOLVERSION 1 #elif ((TARGET_OS_OSX && defined(__MAC_10_15) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_15) || \ @@ -125,7 +126,8 @@ __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_13_0) || \ (TARGET_OS_WATCH && defined(__WATCHOS_6_0) && \ __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_6_0) || \ - (TARGET_OS_TV && defined(__TVOS_13_0) && __TVOS_VERSION_MIN_REQUIRED >= __TVOS_13_0)) + (TARGET_OS_TV && defined(__TVOS_13_0) && __TVOS_VERSION_MIN_REQUIRED >= __TVOS_13_0) || \ + (defined(TARGET_OS_VISION) && TARGET_OS_VISION)) #define GTM_SDK_REQUIRES_SECTRUSTEVALUATEWITHERROR 1 #else #define GTM_SDK_REQUIRES_SECTRUSTEVALUATEWITHERROR 0