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

visionOS Support #679

Open
Saafo opened this issue Sep 25, 2023 · 4 comments
Open

visionOS Support #679

Saafo opened this issue Sep 25, 2023 · 4 comments

Comments

@Saafo
Copy link
Contributor

Saafo commented Sep 25, 2023

Since Xcode's Debug Hierarchy feature is not available on visionOS now, FLEX is heavily needed on visionOS platform.

@Saafo
Copy link
Contributor Author

Saafo commented Sep 25, 2023

I've done some simple works and here is the Demo screenshot on visionOS
image

The simple works including:

  • Replacing keyWindow with windows.firstObject, which is not appropriate, and I'm not sure what's the best replacement(Although UIWindowScene has a private property _isKeyWindowScene and UIWindow has a public property isKeyWindow).
  • Replacing UIScreen.mainScreen.scale with 2 or UIWindowScene.traitCollection.displayScale
  • Disabling UIFeedbackGenerator and other unavailable APIs.

However, there still remains some works to be done:

  1. when I run the demo, some fatalError from Echo always happens:

(The crash issue only happens in SPM Example. In Cocoapods Example, it works fine.)

When directly run the demo, there's a fatalError: No Objective-C class named SISchemaRequestLink. So I set showsSearchBar = NO; in FLEXTableViewController.m. However this fatalError happens again when I take a screenshot by cmd+s:

image
crash stack image

I'm not sure whether it's an issue related to Echo. Directly setup a UISearchController works well.

Echo's crash is very frequent, can be reproduced by restarting the app again, or by press any key.

image
  1. The segment picker (black area) cannot working.
image
  1. The snapshot feature (in views left top button) need updates to UIGraphicsImageRenderer, which is also needed in iOS 17 🤔
image
  1. The select feature completely cannot working.

@Saafo
Copy link
Contributor Author

Saafo commented Sep 26, 2023

Interesting thing: we cannot directly use keyWindow, but the property still exist.

image

@NSExceptional
Copy link
Collaborator

Whoa, nice work! You should put up a PR. I can help with the issues you listed, a lot of them can be worked around with #if's checking for visionOS

@Saafo
Copy link
Contributor Author

Saafo commented Sep 27, 2023

Whoa, nice work! You should put up a PR. I can help with the issues you listed, a lot of them can be worked around with #if's checking for visionOS

I'm glad to provide a pr! But I haven't decided how to solve some of the issues, such as the keyWindow.

And I may request for your help to solve the segmented view and the select feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants