Post

Replies

Boosts

Views

Activity

SwiftUI .toolbar(.keyboard) Not Showing on First Appearance in fullScreenCover (iOS 18)
I’m encountering an issue in iOS 18.5 (and most probably across all iOS 18 versions) where the keyboard toolbar defined with .toolbar(.keyboard) does not appear immediately when a TextField becomes first responder inside a fullScreenCover. Here’s a minimal reproducible example: import SwiftUI struct ContentView: View { @State private var text: String = "" @State private var showSheet: Bool = false var body: some View { NavigationStack { Button("Show Sheet") { showSheet.toggle() } .fullScreenCover(isPresented: $showSheet) { NavigationStack { VStack { Button("Dismiss") { showSheet.toggle() } TextField("Enter text", text: .constant("Hello")) .autocorrectionDisabled() .textInputAutocapitalization(.never) } .padding() .toolbar { ToolbarItemGroup(placement: .keyboard) { toolBar } } } } } } private var toolBar: some View { HStack { Spacer() Button("Done") { UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) } } } } ✅ Expected Behavior: When the TextField becomes active and the keyboard appears, the custom keyboard toolbar with a “Done” button should also appear immediately. ❌ Actual Behavior: On first presentation of the sheet and focusing the TextField, the toolbar is missing. If I background the app and return, the toolbar appears as expected. Dismissing and re-opening the sheet leads to the same issue (toolbar missing again).
Topic: UI Frameworks SubTopic: SwiftUI
2
0
98
Jul ’25
SFCustomLanguageModelData.CustomPronunciation and X-SAMPA string conversion
Can anyone please guide me on how to use SFCustomLanguageModelData.CustomPronunciation? I am following the below example from WWDC23 https://wwdcnotes.com/documentation/wwdcnotes/wwdc23-10101-customize-ondevice-speech-recognition/ While using this kind of custom pronunciations we need X-SAMPA string of the specific word. There are tools available on the web to do the same Word to IPA: https://openl.io/ IPA to X-SAMPA: https://tools.lgm.cl/xsampa.html But these tools does not seem to produce the same kind of X-SAMPA strings used in demo, example - "Winawer" is converted to "w I n aU @r". While using any online tools it gives - "/wI"nA:w@r/".
4
2
775
Oct ’24