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 #Preview parsing (iOS 17+ only) #50

Merged
merged 8 commits into from
Dec 6, 2024
Merged

Conversation

JohnEstropia
Copy link
Member

@JohnEstropia JohnEstropia commented Dec 3, 2024

TODO:

  • Using UIView or UIViewController in iOS 17 #Preview is currently not supported because the view factory used by SwiftUI is exposed as @MainActor () -> UIView , but since we now use Swift 6 compiler, it cannot be casted directly to @MainActor @Sendable () -> UIView (@MainActor now implies @Sendable)

https://forums.swift.org/t/is-there-any-real-difference-between-mainactor-sendable-and-mainactor/72525/8
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0434-global-actor-isolated-types-usability.md

  • We still need a way to filter out unwanted #Previews (ex: Previews inside the StoryBookKit are also being extracted). I'm currently looking at Preview.ViewTraits if this is customizable for our own use Since the list is now grouped by modules, this is not an issue anymore

@JohnEstropia JohnEstropia requested a review from muukii December 3, 2024 07:40
@JohnEstropia JohnEstropia merged commit c2c0693 into main Dec 6, 2024
2 checks passed
@JohnEstropia JohnEstropia deleted the john/previewRevamp branch December 6, 2024 11:48
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