File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Sources/SnapshotPreviewsCore Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 4141 - name : Checkout code
4242 uses : actions/checkout@v2
4343 - name : Xcode select
44- run : sudo xcode-select -s '/Applications/Xcode_16.0 .app/Contents/Developer'
44+ run : sudo xcode-select -s '/Applications/Xcode_16.4 .app/Contents/Developer'
4545 - name : Build TestApp
4646 run : cd Examples && xcodebuild build -scheme DemoApp -sdk xrsimulator -destination 'generic/platform=visionOS Simulator' -project DemoApp/DemoApp.xcodeproj
4747 - name : Build Snapshotting
Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ public struct Preview: Identifiable {
4242 self . orientation = orientation
4343 self . layout = layout
4444 displayName = preview. descendant ( " displayName " ) as? String
45- let source = preview. descendant ( " source " ) ?? preview. descendant ( " dataSource " , " preview " ) !
45+ guard let source = preview. descendant ( " source " ) ?? preview. descendant ( " dataSource " , " preview " ) else {
46+ assertionFailure ( " Preview \( preview) missing source, found: \( preview. children) " )
47+ return nil
48+ }
4649 let _view : @MainActor ( ) -> any View
4750 if let source = source as? MakeViewProvider {
4851 _view = {
@@ -59,9 +62,11 @@ public struct Preview: Identifiable {
5962 return UIViewControllerWrapper ( source. makeViewController)
6063 }
6164 } else {
65+ print ( " Preview \( preview) ( \( displayName ?? " no display name " ) ) did not have matching source type " )
6266 return nil
6367 }
6468 #else
69+ print ( " Preview \( preview) ( \( displayName ?? " no display name " ) ) did not have matching source type " )
6570 return nil
6671 #endif
6772 }
You can’t perform that action at this time.
0 commit comments