FLEXTool / FLEX

An in-app debugging and exploration tool for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

visionOS Support

Saafo opened this issue · comments

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

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.

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

image

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

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