Post

Replies

Boosts

Views

Activity

iOS 16 breaking AVSpeechSynthesisVoice usage
Hello, Since iOS 16 AVSpeechSynthesisVoice.speechVoices() returns [] by default. Based on what I understood so far, this seems to be because iOS 16 doesn't come bundled with voices, unlike all previous versions. This leads to the impossibility to do any speech synthesis using iOS 16 without asking users to go out of the app and download voices manually, meaning a significant barrier to entry and poor UX. Does anyone know a workaround?
1
0
1k
Sep ’22
Xcode 12.2 and iOS 14.2
Hello, I'm fairly new to iOS development, and I'm now seeing that while users are using iOS 14.2 in production, it is still not available via Xcode. This of course means I can't fix their bugs nor build for these devices. I could download the Xcode RC, but then what if it's not stable? Also it seems to require 30GB+ to install Is this normal behavior from Apple ? When will Xcode 12.2 be released ? Thanks
1
0
1.3k
Nov ’20
AVSpeechSynthesisVoice not working for some users
Hello, In my iOS app most users can hear the AVSpeechSynthesisVoice correctly, but some report that it simply does not work. I haven't been able to reproduce the issue locally, but here is how I use the API: let sentence = "the sentence to be told" let synthesizer = AVSpeechSynthesizer() let utterance = AVSpeechUtterance(string: sentence) utterance.voice = AVSpeechSynthesisVoice( 	language: "en-GB" ) utterance.rate = AVSpeechUtteranceDefaultSpeechRate * 1.05 synthesizer.speak(utterance) This works perfectly fine on iOS 13 (tested most minors), all iOS 14 versions, all the devices I could find... but I keep getting reports of people not getting any audio feedback. Do you have any pointers on where to look, or at least reproduce the issue? Thanks
5
0
2.9k
Nov ’20
How to ask users for reviews and not just ratings?
Hello, I'm using requestReview() to ask users to review my app, but it only shows a way to rate the app from 1 to 5 stars... no option to write a review. Because of this I start to have a lot of ratings but no reviews. I see other apps linking to the app store with an action=write-review, but it seems to be discouraged by Apple and the documentation - https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview is indicating that requestReview() should work for this use case: Tells StoreKit to ask the user to rate or review your app, if appropriate. How can I ask for an actual review? Thanks !
0
0
716
Oct ’20
Change in Form layout since iOS14 ?
Hello, After building my SwiftUI for iOS 14 I've noticed that a lot of alignments were broken in the lists - https://developer.apple.com/forums/thread/662544, but also in forms. Now each section seems to be in a rectangle with rounded corners and extra padding. It looks great on devices with large screens, but on smaller screens everything is cluttered and there is barely any space to display the content. Is this a known change in the default UI? Can I revert back to the way it was in iOS13? Thanks!
0
0
661
Oct ’20
How to remove new List padding that appeared on iOS14?
Ever since updating to iOS 14, I get additional padding in my List that I didn't see on iOS 13. I also see this on my Form. Is this a known issue of iOS 14 ? How can I fix this ? var body: some View { 				NavigationView { 						VStack(alignment: .leading){ 								List { 									 // Content goes here 									 // Mostly text and buttons 								} 						}.navigationBarTitle(Text("settings.title"), displayMode: .inline) 			 } } I can't attach a screenshot or link to a service displaying images on this forum, but you can see the visual result here: https://stackoverflow.com/questions/64168107/how-to-remove-new-list-padding-that-appeared-on-ios14
1
0
6.3k
Oct ’20
Unexpected crash with SwiftUI
Hello, I am fairly new to Swift development and I'm encountering a live crash that I can't figure out. Any pointers on how to even figure this one out would be appreciated because I can't reproduce the bug locally. A simplified version of my code looks like this: struct LinkItem: View { 		var content: LocalizedStringKey // This is the line crashing (SettingsView.swift:7) 		var body: some View { 				Text(content) 		} } And the only place where I call this view is here in my SettingsView: LinkItem(content: "settings.tos") LinkItem(content: "settings.pp") LinkItem(content: "settings.sc") and in my string file I have: "settings.tos" = "Terms of service"; "settings.pp" = "Privacy policy"; "settings.sc" = "Support & contact"; Finally here is the data from crashlytics: Crashed: com.apple.main-thread 0	SwiftUI												0x1bde98bd0 ViewRendererHost.render(interval:updateDisplayList:) + 560 1	SwiftUI												0x1be003f94 _UIHostingView.layoutSubviews() + 168 2	SwiftUI												0x1be003fc0 @objc _UIHostingView.layoutSubviews() + 24 3	UIKitCore											0x18b6a73d0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2140 4	QuartzCore										 0x18dc0a7dc -[CALayer layoutSublayers] + 284 5	QuartzCore										 0x18dc10958 CA::Layer::layout_if_needed(CA::Transaction*) + 480 6	UIKitCore											0x18b693684 -[UIView(Hierarchy) layoutBelowIfNeeded] + 536 7	UIKitCore											0x18ab69358 -[UINavigationController _layoutViewController:] + 1188 8	UIKitCore											0x18ab63210 -[UINavigationController _layoutTopViewControllerLookForNested:] + 604 9	UIKitCore											0x18ab65074 -[UINavigationController _performWhileIgnoringUpdateTopViewFramesToMatchScrollOffset:] + 48 10 UIKitCore											0x18ab652f8 -[UINavigationController _performTopViewGeometryUpdates:] + 112 11 UIKitCore											0x18ab651c4 -[UINavigationController _updateTopViewFramesToMatchScrollOffsetInViewController:contentScrollView:topLayoutType:] + 244 12 UIKitCore											0x18ab64e14 -[UINavigationController _updateTopViewFramesForViewController:isCancelledTransition:isOrientationChange:] + 236 13 UIKitCore											0x18ab725b8 -[UINavigationController _navigationBarChangedSize:] + 392 14 UIKitCore											0x18a91fdf0 -[UINavigationBar _sendNavigationBarResize] + 76 15 UIKitCore											0x18a9689d8 -[_UINavigationBarVisualProviderModernIOS changeLayout] + 80 16 UIKitCore											0x18a9714f8 -[_UINavigationBarVisualProviderModernIOS navigationItemUpdatedLargeTitleDisplayMode:] + 180 17 UIKitCore											0x18a9246b0 -[UINavigationItem setLargeTitleDisplayMode:] + 64 18 SwiftUI												0x1bdd0cf48 UINavigationItem.update(using:environment:navController:) + 320 19 SwiftUI												0x1bdb02d78 UIKitNavigationBridge.preferencesDidChange(_:) + 544 20 SwiftUI												0x1bda979d0 _UIHostingView.preferencesDidChange() + 436 21 SwiftUI												0x1bdb82e60 ViewGraph.updateOutputs(at:) + 176 22 SwiftUI												0x1bdea3844 closure #1 in closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 960 23 SwiftUI												0x1bdea32ac closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 576 24 SwiftUI												0x1bde98b30 ViewRendererHost.render(interval:updateDisplayList:) + 400 25 SwiftUI												0x1be003f94 _UIHostingView.layoutSubviews() + 168 26 SwiftUI												0x1be003fc0 @objc _UIHostingView.layoutSubviews() + 24 27 UIKitCore											0x18b6a73d0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2140 28 QuartzCore										 0x18dc0a7dc -[CALayer layoutSublayers] + 284 29 QuartzCore										 0x18dc10958 CA::Layer::layout_if_needed(CA::Transaction*) + 480 30 QuartzCore										 0x18dc1b578 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136 31 QuartzCore										 0x18db63f1c CA::Context::commit_transaction(CA::Transaction*, double) + 304 32 QuartzCore										 0x18db8dc08 CA::Transaction::commit() + 676 33 UIKitCore											0x18b228e58 __34-[UIApplication _firstCommitBlock]_block_invoke_2 + 80 34 CoreFoundation								 0x18711c834 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 20 35 CoreFoundation								 0x18711bfd4 __CFRunLoopDoBlocks + 264 36 CoreFoundation								 0x187117250 __CFRunLoopRun + 1100 37 CoreFoundation								 0x187116adc CFRunLoopRunSpecific + 464 38 GraphicsServices							 0x19109c328 GSEventRunModal + 104 39 UIKitCore											0x18b211ae0 UIApplicationMain + 1936 40 MY APP												 0x1041b6de4 main + 7 (SettingsView.swift:7) 41 libdyld.dylib									0x186fa0360 start + 4 I've then tried to change the code to pass a String, but I'm getting the exact same crash. struct LinkItem: View { 		var content: String 		var body: some View { 				Text( NSLocalizedString(content, comment: "")) 		} } It was later pointed out to me that it could be related to UINavigationItem setLargeTitleDisplayMode. Here is what I do in the SettingsView: .navigationBarTitle(Text("settings.title"), displayMode: .inline) In context, it's more or less: var body: some View { 	NavigationView { 		VStack(alignment: .leading){ 			// Most content 		}..navigationBarTitle(Text("settings.title"), displayMode: .inline) 	} } In my ContentView I have the following things in my init call: init() { 	UINavigationBar.appearance().isTranslucent = false 	UINavigationBar.appearance().titleTextAttributes = [ 		.foregroundColor: Color.appDark.uiColor(), 		.font : UIFont.systemFont(ofSize: 14, weight: UIFont.Weight.bold) 	] }
0
0
1.6k
Oct ’20
Custom back button with SwiftUI
Hello, I'm trying to remove the current back button behavior in a navigation view and instead have a simple arrow. Disabling the button with navigationBarBackButtonHidden and then adding my own with navigationBarItems works, but then I lose the swipe gesture to go back. I could try to rebuild this swipe gesture, but that seems hard to get the same feel, and it will most likely break often. Is there something simpler ? I'd be satisfied with just removing the text of the back button and keeping only the <. Thanks
11
2
12k
Oct ’20