Post

Replies

Boosts

Views

Activity

Reply to Touch layout not matching UI layout on iPhone after waking device when .sheet is open
@Apple Any feedback on this? Can we expect a fix on this or do I need to implement a workaround for this in our upcoming release? Btw, this is my current workaround. You can add this to any View you show within the sheet, popover, etc... and when it gets dismissed, it will 'reset' the layout. public func body(content: Content) -> some View { content .onDisappear { let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene if let viewFrame = scene?.windows.first?.rootViewController?.view.frame { scene?.windows.first?.rootViewController?.view.frame = .zero scene?.windows.first?.rootViewController?.view.frame = viewFrame } } } } public extension View { func syncLayoutOnDissappear() -> some View { modifier(SyncLayoutOnDissappear()) } }
Feb ’23
Reply to SFSpeechRecognizer.isAvailable returns wrong values
Further experimentation yields the following findings. When the iOS device is set to English (US), both SFSpeechRecognizer.isAvailable and .supportsOnDeviceRecognition return true. If we then set the SFSpeechAudioBufferRecognitionRequest’s requiresOnDeviceRecognition to true, we observe the stated issue where speechrecognition tasks fail with “Siri and Dictation are disabled” errors, while according to the SFSpeechRecognizer, it should work.
Oct ’23