Thanks to https://developer.apple.com/forums/thread/733918
(I tested this snippet in Vision Pro lab and it worked.)
extension Entity {
public func setGroundingShadow(_ castsShadow: Bool) {
self.enumerateHierarchy { entity, stop in
if entity is ModelEntity {
entity.components.set(GroundingShadowComponent(castsShadow: castsShadow))
}
}
}
private func enumerateHierarchy(_ body: (Entity, UnsafeMutablePointer<Bool>) -> ()) {
var stop = false
func enumerate(_ body: (Entity, UnsafeMutablePointer<Bool>) -> ()) {
guard !stop else {
return
}
body(self, &stop)
for child in children {
guard !stop else {
break
}
child.enumerateHierarchy(body)
}
}
enumerate(body)
}
}
Post
Replies
Boosts
Views
Activity
I also want to ask this question. In addition, I want to opt out of the systemSmall lock screen widget on the iPad. It seems that as long as it is compiled through the iOS 17 SDK, the widget must adapt to all positions.
😐 Frustrated. SwiftUI Previews have never worked smoothly.
Same here.
TabView {
NavigationSplitView {
...
// If you switch between different sub page, the tab bar ornament on the left disappear. 100% reproducible.
} detail: {
...
}
}
Update: The worst case is not that the third-party library fails to compile on visionOS, but that it compiles successfully and behaves incorrectly.
@eskimo Hi :)
I can reproduce the warning by creating a new iOS project. Then enable Mac Catalyst and build.
Screen recording:
https://youtu.be/kJ3ayFV-Pns
FB12900696
Xcode 15 beta 6 fixed the issue.
Xcode 15 beta 6 fixed the bug.
@Urkman No update and no workaround. I have to create a branch for the CI which using Xcode 15 beta 4...
The issue has been partially resolved in the second beta version of visionOS. The defaultSize() modifier is now functional. However, the startup loading view remains fixed at 2m×1m.
FB12776450
FB12765484
FB12757613
FB12755888