Post

Replies

Boosts

Views

Activity

AVSpeechSynthesizer Enhanced voices produce silent audio in sandboxed Mac Catalyst app
I have reproduced an issue with AVSpeechSynthesizer on macOS 26.6.2 (25G83) using a minimal Mac Catalyst application. Environment macOS 26.6.2 (25G83) Apple Silicon Xcode 26.x Mac Catalyst AVSpeechSynthesizer Enhanced voice: com.apple.voice.enhanced.en-GB.Daniel The problem is specifically related to App Sandbox. Reproduction I created a completely new minimal Mac Catalyst application. With App Sandbox disabled: let synthesizer = AVSpeechSynthesizer() let utterance = AVSpeechUtterance(string: "Hello, this is a test.") utterance.voice = AVSpeechSynthesisVoice(identifier: "com.apple.voice.enhanced.en-GB.Daniel") synthesizer.speak(utterance) The Enhanced voice works normally. With App Sandbox enabled, with no other sandbox capabilities enabled, the same code no longer produces audible speech.
3
0
1.1k
Sep ’26
UITextView selectedRange property
What is the string representation (or another object) for this property is applied? Can we use Range(txtView.selectedRange, in: txtView.text) to get valid indices in UITextView.text? What is the difference of UITextView.selectedRange to UITextView.SelectedTextRange?
1
0
737
Mar ’24
iOS 17 AVAudioSession .allowBluetooth issue
in iOS 17 (21A5326A) audioSession.setCategory(.playAndRecord, mode: .default,options: .allowBluetooth) does not set input to bluetooth. In iOS 16 it does. Here the steps to reproduce: Create project with storyboard. in info.plist add NSMicrophoneUsageDescription Your microphone will be used to record your speech when you press the "Start Recording" button. put in ViewController: import UIKit import Speech class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override public func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) AVAudioSession.sharedInstance().requestRecordPermission { granted in } } func startAudioSession(){ let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setCategory(.playAndRecord, mode: .default,options: .allowBluetooth) try audioSession.setActive(true,options: .notifyOthersOnDeactivation) print(audioSession.currentRoute.description) } catch { } } @IBAction func btnTap(_ sender: UIButton) { startAudioSession() } } put button on the Main.storyboard and link it to btnTap Connect bluetooth headset to iphone, start the App and tap button. in iOS 16 see the current route - bluetooth. in iOS 17 see the current route - speaker
1
2
1.6k
Sep ’23
ios 16 uitextview refresh problem
ViewController.swift Adding text through uitextview text property have strange effect in ios 16. Have: uitextview with some text that bigger than uitextview height The end of text is visible (so the start of the text is not visible) Testing: Add some string ("a") to the end of the uitextview (txtView.text = txtView.text + "a") Expected: The txtView shows the the old text + "a" Observed: After one or two adding the "a" the old text disappeared from the text view After tapping in the textview the text appear I have attached the small project with uitextview and two buttons: button left and button right. Button right - adding the letter "a" to the end of the text Button left - simply removes the soft keyboard if its appear This project works correct in ios 15 (emulator and real device) and works wrong in ios 16 (emulator and real device)
Topic: UI Frameworks SubTopic: UIKit Tags:
3
0
1.8k
Aug ’22
AVSpeechSynthesizer Enhanced voices produce silent audio in sandboxed Mac Catalyst app
I have reproduced an issue with AVSpeechSynthesizer on macOS 26.6.2 (25G83) using a minimal Mac Catalyst application. Environment macOS 26.6.2 (25G83) Apple Silicon Xcode 26.x Mac Catalyst AVSpeechSynthesizer Enhanced voice: com.apple.voice.enhanced.en-GB.Daniel The problem is specifically related to App Sandbox. Reproduction I created a completely new minimal Mac Catalyst application. With App Sandbox disabled: let synthesizer = AVSpeechSynthesizer() let utterance = AVSpeechUtterance(string: "Hello, this is a test.") utterance.voice = AVSpeechSynthesisVoice(identifier: "com.apple.voice.enhanced.en-GB.Daniel") synthesizer.speak(utterance) The Enhanced voice works normally. With App Sandbox enabled, with no other sandbox capabilities enabled, the same code no longer produces audible speech.
Replies
3
Boosts
0
Views
1.1k
Activity
Sep ’26
UITextView selectedRange property
What is the string representation (or another object) for this property is applied? Can we use Range(txtView.selectedRange, in: txtView.text) to get valid indices in UITextView.text? What is the difference of UITextView.selectedRange to UITextView.SelectedTextRange?
Replies
1
Boosts
0
Views
737
Activity
Mar ’24
iOS 17 AVAudioSession .allowBluetooth issue
in iOS 17 (21A5326A) audioSession.setCategory(.playAndRecord, mode: .default,options: .allowBluetooth) does not set input to bluetooth. In iOS 16 it does. Here the steps to reproduce: Create project with storyboard. in info.plist add NSMicrophoneUsageDescription Your microphone will be used to record your speech when you press the "Start Recording" button. put in ViewController: import UIKit import Speech class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override public func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) AVAudioSession.sharedInstance().requestRecordPermission { granted in } } func startAudioSession(){ let audioSession = AVAudioSession.sharedInstance() do { try audioSession.setCategory(.playAndRecord, mode: .default,options: .allowBluetooth) try audioSession.setActive(true,options: .notifyOthersOnDeactivation) print(audioSession.currentRoute.description) } catch { } } @IBAction func btnTap(_ sender: UIButton) { startAudioSession() } } put button on the Main.storyboard and link it to btnTap Connect bluetooth headset to iphone, start the App and tap button. in iOS 16 see the current route - bluetooth. in iOS 17 see the current route - speaker
Replies
1
Boosts
2
Views
1.6k
Activity
Sep ’23
ios 16 uitextview refresh problem
ViewController.swift Adding text through uitextview text property have strange effect in ios 16. Have: uitextview with some text that bigger than uitextview height The end of text is visible (so the start of the text is not visible) Testing: Add some string ("a") to the end of the uitextview (txtView.text = txtView.text + "a") Expected: The txtView shows the the old text + "a" Observed: After one or two adding the "a" the old text disappeared from the text view After tapping in the textview the text appear I have attached the small project with uitextview and two buttons: button left and button right. Button right - adding the letter "a" to the end of the text Button left - simply removes the soft keyboard if its appear This project works correct in ios 15 (emulator and real device) and works wrong in ios 16 (emulator and real device)
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
3
Boosts
0
Views
1.8k
Activity
Aug ’22