Hi Houman,Did you ever end up solving this?I'm currently having the same issue.
Post
Replies
Boosts
Views
Activity
Were you ever able to resolve this?
This continues to be a problem running Xcode Version 13.1 (13A1030d).
@Dalaplan did you ever end up solving this? I have a similar issue.
This error appeared when I ran preview whilst having an iOS 13 simulator selected.
Switching to a simulator of iOS14+ resolved the issue for me.
The SwiftUI team actually advise against what you're suggesting.
Here is a SwiftUI engineer from Apple's most recent QA session.
I have been experiencing this lately. I have raised a ticket with Apple Developer Technical Support.
Would love to know the answer to this.
I am still experiencing this in iOS 18.1 using Xcode 16.
Feedback filed: FB15164652
See the following sample project:
import SwiftUI
import AVFoundation
class Synthesizer: NSObject, AVSpeechSynthesizerDelegate {
let avSpeechSynthesizer = AVSpeechSynthesizer()
override init() {
super.init()
avSpeechSynthesizer.delegate = self
}
func play() {
let utterance = AVSpeechUtterance(string: "Hello world, this is a long string of many words many words many words many words many words")
avSpeechSynthesizer.speak(utterance)
}
func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didStart utterance: AVSpeechUtterance) {
print("didStart \(utterance)")
DispatchQueue.main.asyncAfter(deadline: .now() + 2) { [weak self] in
self?.avSpeechSynthesizer.stopSpeaking(at: .word)
}
}
func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance) {
print("didFinish \(utterance)")
}
func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didCancel utterance: AVSpeechUtterance) {
print("didCancel \(utterance)")
}
}
struct ContentView: View {
@State private var synthesizer = Synthesizer()
var body: some View {
Button("Play") {
synthesizer.play()
}
}
}
Were you able to find a solution to this?
I see there is a navigationTitle modifier that takes a binding, allowing simple renaming but I haven't figured out how to pass in a binding to the Document's name.