Post

Replies

Boosts

Views

Activity

Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
Thanks for the detailed feedback. I get it that it's not practical to target pre-release betas. With #available checks, i use that, i even have this package which has various backwards compatible modifiers for new APIs. It follows same concept as your Additional struct. My question on how to handle crashes is not limited to just iOS version variations issues. I was refering to general exceptions and runtime errors that can cause app termination. Thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
I am using a view modifier like this: struct GlassEffectViewModifier: ViewModifier { var shape: any InsettableShape = .capsule var fallBack: Material = .thin func body(content: Content) -> some View { if #available(iOS 26.0, *) { content .glassEffect(.regular, in: shape) } else { content .background(fallBack, in: .capsule) } } } extension View { public func withGlassEffect( in shape: some InsettableShape = .capsule, fallback: Material = .thin ) -> some View { modifier( GlassEffectWithShapeViewModifier(shape: shape, fallBack: fallback) ) } } It always crashes on the .glassEffect(.regular, in: shape) line. If i comment it out or use a different modifier, it doesn't crash.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’25
Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
Thanks for the detailed feedback. I get it that it's not practical to target pre-release betas. With #available checks, i use that, i even have this package which has various backwards compatible modifiers for new APIs. It follows same concept as your Additional struct. My question on how to handle crashes is not limited to just iOS version variations issues. I was refering to general exceptions and runtime errors that can cause app termination. Thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
My main concern now is, isn't there any proper way to handle such errors or excetions so that app doesn't just terminate without any message to user?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to .glassEffect(_in:) crushing on iOS 26 public beta.
I am using a view modifier like this: struct GlassEffectViewModifier: ViewModifier { var shape: any InsettableShape = .capsule var fallBack: Material = .thin func body(content: Content) -> some View { if #available(iOS 26.0, *) { content .glassEffect(.regular, in: shape) } else { content .background(fallBack, in: .capsule) } } } extension View { public func withGlassEffect( in shape: some InsettableShape = .capsule, fallback: Material = .thin ) -> some View { modifier( GlassEffectWithShapeViewModifier(shape: shape, fallBack: fallback) ) } } It always crashes on the .glassEffect(.regular, in: shape) line. If i comment it out or use a different modifier, it doesn't crash.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’25
Reply to SwiftUI Instrumentation Fails to start
Yes Xcode 26.0 iOS 18.7.1 Alright, thanks for the feedback. I guess it wasn't working because of the ios version. I tried the legacy version and it work.
Replies
Boosts
Views
Activity
Nov ’25