Post

Replies

Boosts

Views

Activity

SwiftUI Catalyst app on Big Sur losing focus.
I have been working with several SwiftUI apps using Catalyst for Mac support. There seems to be a major issue where the entire app or portions of the app become unresponsive to clicks or other events seemingly because a loss of focus. Sometimes it is recoverable by clicking around random parts of the window, but sometimes it is just stuck. Does anyone know how to get this under control, or perhaps start controlling which parts of the app get focus? Also, when returning from modal states, focus seems to land on a random ui element. I would like to know how to control this.
9
0
3.4k
Nov ’20
AVSpeechSynthesizer CRASH with certain voices under iOS 14.2+
Starting with iOS 14.2, AVSpeechSynthesizer will crash when it has a delegate assigned which implements the method, speechSynthesizer(_:willSpeakRangeOfSpeechString:utterance:). The mere presence of the above method in the delegate will cause a crash BUT ONLY WITH CERTAIN VOICES. For example the default voice crashes while the enhanced voice, Alex does not. I've created a simple project (which I've submitted through Feedback Assistant) with two buttons which demonstrates how one voice will cause a crash while another will not. This breaks critical functionality of my app and my customers are not happy. Any help with this would be much appreciated!
22
0
6.3k
Jan ’21
No Way to detect cancelled DragGesture in SwiftUI
There’s no way to know when a DragGesture() has been canceled. Perhaps this was left out of SwiftUI on purpose because the onEnded event should suffice? Well I think that's wrong because when there’s a DragGesture on a view inside a ScrollView, the DragGesture’s onChanged event get’s triggered when you start scrolling the content inside the ScrollView however the DragGesture’s onEnded event is never fired apparently because it was CANCELED by the act of scrolling the ScrollView. BUT there’s no way for me to know that it was cancelled because there's no canceled event handler like we had for such things in UIKit. So my code is left in an incorrect state where it thinks it’s in the middle of a DragGesture. But it isn't.
0
0
1k
Mar ’21
SF Symbols Beta Crash
Hello. I've figured out how to make the new SF Symbols (V3) Beta crash consistently. This crash makes the custom symbols functionality of the app inaccessible. All you need to do is drop a certain custom SF Symbol template into the app and it will start crashing. I've filed a feedback with the file attached and instructions to reproduce (FB9217085). I'm posting here to hopefully increase the odds of this being addressed in a timely fashion as I'm trying to add support for V3 SF Symbols to my app.
0
0
941
Jun ’21
Custom CoreImage Box Blur kernel Much slower than equivalent built-in CIBoxBlur
I've created a custom BoxBlur kernel that produces identical results to Apple's built-in box blur (CIBoxBlur) kernel but my custom kernel is orders of magnitude slower. So naturally I am wondering what I'm doing wrong to get such poor performance. Below is my custom kernel in the Metal shading language. Can you spot why it's so slow? The built-in filter performs well so I can only assume it's something I'm doing wrong. #include <CoreImage/CoreImage.h> #import <simd/simd.h> extern "C" { namespace coreimage { float4 customBoxBlurFilterKernel(sampler src) { float2 crd = src.coord(); int edge = 100; int minx = crd.x - edge; int maxx = crd.x + edge; int miny = crd.y - edge; int maxy = crd.y + edge; float4 sums = float4(0,0,0,0); float cnt = 0; // compute average of surrounding rgb values for(int row=miny; row < maxy; row++) { for(int col=minx; col < maxx; col++) { float4 samp = src.sample(float2(col, row)); sums[0] += samp[0]; sums[1] += samp[1]; sums[2] += samp[2]; cnt += 1.; } } return float4(sums[0]/cnt, sums[1]/cnt, sums[2]/cnt, 1); } } }
2
0
1.3k
Dec ’21
How to use the "write" function in a CoreImage Metal shader
There is a write function documented in the CoreImage Metal shader reference here: https://developer.apple.com/metal/MetalCIKLReference6.pdf But I'm not sure how to use it. I assumed one would be able to use it on the destination parameter i.e. dest.write(...) but I get the error, "no member named 'write' in 'coreimage::destination'" How do I use this function?
1
0
927
Dec ’21
AVSpeechSynthesizer Leaking Like a Sieve
I've found multiple leaks in AVSpeechSynthesizer which are plaguing my users. My users are complaining of crashes due to this. Ive created a feedback item (FB12212129) with a sample project attached which demonstrates one of the leaks. I'm hoping an engineer notices this. The only way ive hade my feedback noticed in the past is by both creating a feedback item AND posting on the forums. So here's my forum post. Help is much appreciated!
6
5
3.4k
May ’23
PDFKit's characterIndex(at:) Method Innacurate on iOS 17 (REGRESSION)
PDFKit’s characterIndex(at:) method consistently returns the incorrect character index on iOS 17. It seems to get worse the further down the page you get. This breaks critical functionality that my app relies on. Prior to iOS 17, it would be wrong sometimes but not as consistently. This is the method in question: https://developer.apple.com/documentation/pdfkit/pdfpage/1503775-characterindex I've filed feedback FB12951475 with a sample project attached.
3
0
839
Aug ’23
AVSpeechSynthesisVoice.speechVoices() Includes Voices That Aren't Available after Upgrading iOS
AVSpeechSynthesisVoice.speechVoices() returns voices that are no longer available after upgrading from iOS 16 to iOS 17 (although this has been an issue for a long time, I think). To reproduce: On iOS 16 download 1 or more enhanced voices under “Accessibility > Spoken Content > Voices”. Upgrade to iOS 17 Call AVSpeechSynthesisVoice.speechVoices() and note that the voices installed in step (1) are still present, yet they are no longer downloaded, therefore they don’t work. And there is no property on AVSpeechSynthesisVoice to indicate if the voice is still available or not. This is a problem for apps that allow users to choose among the available system voices. I receive many support emails surrounding iOS upgrades about this issue. I have to tell them to re-download the voices which is not obvious to them. I've created a feedback item for this as well (FB12994908).
1
1
845
Aug ’23
Cannot Start Audio Playback from Interactive Widget (iOS 17)
I want to be able to start/stop audio from my interactive widget. But when I try to start playback with my AppIntent, I get the error, ATAudioSessionClientImpl.mm:281 activation failed. status = 561015905 This indicates the app isn't set up properly for background audio, but it has Audio, AirPlay, and Picture in Picture checked in Background Modes. Is this an intentional limitation of 3rd party widgets? The Apple Music widget is able to start and stop audio without the app being in the foreground. Can third party apps do it too?
2
1
2.5k
Aug ’23
Cannot Play mp3 File via AudioContext in iOS 18 Safari
I have a Safari extension that plays audio via the javascript AudioContext API. It was working fine under iOS 17 and is now broken under iOS 18. It does not play audio at all. I've tried in both the iOS 18 public beta and the iOS 18.1 developer beta. It is broken in both of them. I've also created Feedback item FB15170620 which has a url attached to a page I created which demonstrates the issue.
0
0
341
Sep ’24