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

Use visionOS SDK instead iOS SDK. #24

Merged
merged 8 commits into from
Mar 14, 2024

Conversation

noppefoxwolf
Copy link
Contributor

@noppefoxwolf noppefoxwolf commented Mar 13, 2024

Changes

  • Removed Apple Vision (Designed for iPad) target.
  • Added Apple Vision (visionOS SDK) target.
  • Edited embed Clip filter
    • Allow any platform to iOS and macOS
  • Added visionOS platform to Package.swift
  • Browser support

Simulator Screenshot - Apple Vision Pro - 2024-03-13 at 20 34 00

@d-date
Copy link
Member

d-date commented Mar 13, 2024

Hi @noppefoxwolf ,

When visionOS is targeted instead of Designed for iPad, the SFSafariViewController does not seem to modal when clicking on a link. You can check if you like!

@noppefoxwolf noppefoxwolf mentioned this pull request Mar 13, 2024
@noppefoxwolf
Copy link
Contributor Author

@d-date In visionOS, App uses openURL instead SafariViewRepresentation by this changes fc8d638.

@noppefoxwolf
Copy link
Contributor Author

noppefoxwolf commented Mar 13, 2024

@d-date Currently, TrySwiftView has many modifier. So my Mac (M1 Max) stopped compile 😂. Do you have any idea?
CleanShot 2024-03-13 at 21 43 54@2x

@d-date
Copy link
Member

d-date commented Mar 13, 2024

@noppefoxwolf If you mean View.sheet modifier, you can gather reducers into .safari state / action. So that you can reduce modifiers into one.

@noppefoxwolf
Copy link
Contributor Author

@d-date It's work fine! I made .safari modifier. Please review this PR again please.

@d-date
Copy link
Member

d-date commented Mar 14, 2024

@noppefoxwolf Sorry, It's not my expect.
I mean you can reduce cases of Destination reducer into single case enum, not create custom modifier. I think much of custom modifier in SwiftUI should be avoided. Please consider to resolve on Reducer.

https://github.com/tryswift/trySwiftTokyoApp/blob/main/MyLibrary/Sources/trySwiftFeature/trySwift.swift#L40-L44

@Reducer(state: .equatable)
enum Destination {
  case safari(Safari)
}

@noppefoxwolf
Copy link
Contributor Author

@d-date Got it. I reverted .safari and apply reducer cases in 0dbb60d .

@@ -63,6 +63,8 @@ public struct ScheduleDetail {
public struct ScheduleDetailView: View {

@Bindable public var store: StoreOf<ScheduleDetail>

@Environment(\.openURL) var openURL
Copy link
Member

Choose a reason for hiding this comment

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

Please use @dependency(.openURL) instead for Test dependency in Reducer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I use @dependency, I don't need to switch os in view because reducer can run openURL. Is it right?
CleanShot 2024-03-14 at 14 07 49@2x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to apply this pattern.
2133159

Copy link
Member

@d-date d-date left a comment

Choose a reason for hiding this comment

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

Yes It's enough! Thank you for contribution. We'll submit Vision OS version when you ready #25

@d-date d-date merged commit 3b8c07d into tryswift:main Mar 14, 2024
@noppefoxwolf
Copy link
Contributor Author

@d-date Thanks! I'll commit new AppIcon Stack in other PR.

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

2 participants