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 support for VisionOS #81

Merged
merged 2 commits into from
Oct 19, 2023
Merged

Add support for VisionOS #81

merged 2 commits into from
Oct 19, 2023

Conversation

tapsandswipes
Copy link
Contributor

Add the changes needed to make this library usable in VisionOS

Signed-off-by: Antonio Cabezuelo Vivo <antonio@tapsandswipes.com>
@dmrschmidt
Copy link
Owner

Hey @tapsandswipes,

thanks for the PR. I haven't played around with visionOS at all so far. So before I can merge this, I'll need to add an example app to the repo. Not sure how involved this will be, so I can't say when I'd get done with that.

@tapsandswipes
Copy link
Contributor Author

No hurry. If I have time I'll create one and add it to this PR.

Just a copy of the MacOS one

Signed-off-by: Antonio Cabezuelo Vivo <antonio@tapsandswipes.com>
@tapsandswipes
Copy link
Contributor Author

Done, I added a simple example app for VisionOS

@dmrschmidt
Copy link
Owner

dmrschmidt commented Oct 19, 2023

Hey @tapsandswipes,

looks good in general, so I've just merged it in. Thanks a lot for this!
There's remaining deprecation warnings for the use of onChange however, so I'll hold of with tagging a new release until I've removed those. I'd like to avoid any if @available branching for older iOS SDKs but will have to look into how to achieve that, especially since it's rather annoying to do with view modifiers. I believe it may be necessary though there's no earlier APIs that are not marked deprecated - I think.

Screenshot 2023-10-19 at 07 58 31

dmrschmidt added a commit that referenced this pull request Oct 21, 2023
This reverts commit 07a19db, reversing
changes made to 6a4c99a.
@dmrschmidt
Copy link
Owner

Well... had to revert this due to 4888126#r130500076

Current state is in vision-os branch. I managed to get rid of the os(visionOS) related warnings, but then the .onChange failed again. I don't want to have open warnings in the library, so for until I figure out why the latest state in that branch still does not compile on Xcode 14 I'll leave it reverted. I must be missing something stupid.

@tapsandswipes
Copy link
Contributor Author

tapsandswipes commented Oct 21, 2023

OK, I understand. I guess we need some #if swift(>=5.9) checks around those #if os(visionOS). I'll try to take a look tomorrow.

@dmrschmidt
Copy link
Owner

The visionOS checks Ive already prefixed with that and it helped. However the actual updated onChange handler call now, despite being behind an if #available check, raises an error again.

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.

2 participants