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

Support visionOS target #213

Merged
merged 3 commits into from Jan 18, 2024
Merged

Support visionOS target #213

merged 3 commits into from Jan 18, 2024

Conversation

persidskiy
Copy link
Contributor

@persidskiy persidskiy commented Jan 16, 2024

This PR supports visionOS target.

It also bumps the minimal xcode version to 14.1. This is required to use .custom("visionOS", versionString: "1.0") in spm, which is supported starting from swift 5.6. However, I decided it's safe to bump the minimal swift version to 5.7, as Xcode 14.1 is the minimal supported version for AppStore distribution.

Also, added CI test runs on iOS and visionOS simulators.

@persidskiy persidskiy force-pushed the ps/vision-os branch 2 times, most recently from 7e66deb to 9506d7b Compare January 16, 2024 22:26
@persidskiy persidskiy changed the title Support for visionOS Support visionOS target Jan 16, 2024
@persidskiy persidskiy force-pushed the ps/vision-os branch 3 times, most recently from bff6acd to f5df956 Compare January 17, 2024 11:21
type: string
macos:
xcode: 15.2.0
resource_class: macos.m1.medium.gen1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visionOS simulator is only supported on M1

@@ -24,6 +24,9 @@ Pod::Spec.new do |s|
s.osx.deployment_target = "10.13"
s.tvos.deployment_target = "11.0"
s.watchos.deployment_target = "4.0"
# CocoaPods doesn't support releasing of visionOS pods yet, need to wait for v1.15.0 release of CocoaPods
# with this fix https://github.com/CocoaPods/CocoaPods/pull/12159.
# s.visionos.deployment_target = "1.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this fails the pod spec lint with the following error:

    - ERROR | [visionOS] unknown: Encountered an unknown error (Could not find a `visionos` simulator (valid values: ios, tvos, watchos, xros). Ensure that Xcode -> Window -> Devices has at least one `visionos` simulator listed or otherwise add one.) during validation.

I think it's fine not to support VisionOS for CocoaPods distribution for a while.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the main branch of CocoaPods for releases for now? Not sure if it will break integration for customers with pre-1.15 CocoaPods

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They say it doesn't work still CocoaPods/CocoaPods#12159 (comment)

If nobody fixes it and I have time, I'll try to fix it myself.

@@ -1,12 +1,12 @@
// swift-tools-version:5.5
// swift-tools-version:5.7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could leave this file unmodified and create a separate one named Package@swift-5.7.swift, but it's probably okay to drop Xcode 13 support already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was initial idea, but then it's a duplicate and swift build was failing. So I decided it worth to update xcode requirement, as it xcode 13 is not supported in appstore anyway.

Copy link
Contributor

@OdNairy OdNairy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Makes sense to bump min Xcode requirement

@@ -24,6 +24,9 @@ Pod::Spec.new do |s|
s.osx.deployment_target = "10.13"
s.tvos.deployment_target = "11.0"
s.watchos.deployment_target = "4.0"
# CocoaPods doesn't support releasing of visionOS pods yet, need to wait for v1.15.0 release of CocoaPods
# with this fix https://github.com/CocoaPods/CocoaPods/pull/12159.
# s.visionos.deployment_target = "1.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the main branch of CocoaPods for releases for now? Not sure if it will break integration for customers with pre-1.15 CocoaPods

@persidskiy persidskiy merged commit c02e7a3 into main Jan 18, 2024
6 checks passed
@persidskiy persidskiy deleted the ps/vision-os branch January 18, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants