I am experiencing this issue in Xcode 13.2.1 on an iOS 14.8.1 device. Take this simple custom ViewModifier which applies the appropriate non-deprecated capitalization modifier based on the OS.
struct CapitalizationModifier: ViewModifier {
let shouldCapitalize: Bool
func body(content: Content) -> some View {
if #available(iOS 15.0, *) {
content.textInputAutocapitalization(shouldCapitalize ? .words : .never)
} else {
content.autocapitalization(shouldCapitalize ? .words : .none)
}
}
}
I found that the crash only happens when built in the release configuration, but not debug. Changing the Optimization Level in the Swift Compiler - Code Generation section of the target's Build Settings prevents the crash.
Post
Replies
Boosts
Views
Activity
I have a similar issue but it is triggered by taking a screenshot. After launching the App Clip with an invocation URL, taking a screenshot triggers my selector for onContinueUserActivity(NSUserActivityTypeBrowsingWeb) to be called. I'm not even sure where this URL is coming from as it's not an invocation that I have launched recently.