Posts

Post marked as solved
2 Replies
1.6k Views
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?
Posted Last updated
.
Post not yet marked as solved
6 Replies
2.7k Views
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!
Posted Last updated
.
Post not yet marked as solved
1 Replies
685 Views
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).
Posted Last updated
.
Post not yet marked as solved
2 Replies
514 Views
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.
Posted Last updated
.
Post not yet marked as solved
4 Replies
1.3k Views
Hello. There is a "Highlight" context menu option that shows up when a user right-clicks some selected text in a PDF. There is no way to get rid of this menu item and clicking it does nothing. How do I get rid of it? I tried overriding buildMenu(with builder: UIMenuBuilder) to remove it but that doesn't work. Help!
Posted Last updated
.
Post marked as solved
1 Replies
813 Views
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?
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.1k Views
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); } } }
Posted Last updated
.
Post marked as solved
8 Replies
3k Views
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.
Posted Last updated
.
Post not yet marked as solved
0 Replies
839 Views
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.
Posted Last updated
.
Post not yet marked as solved
1 Replies
862 Views
A Custom SF symbol template doesn't render properly when using a SwiftUI Image. For example: Image(uiImage:UIImage(named:"my_custom_symbol")!) The resulting image is stretched to fit the space defined by the left and right margins of the custom symbol. It works fine in a UIKit view.
Posted Last updated
.
Post not yet marked as solved
0 Replies
803 Views
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.
Posted Last updated
.
Post not yet marked as solved
22 Replies
5.4k Views
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!
Posted Last updated
.
Post not yet marked as solved
0 Replies
647 Views
Hello. I've used SwiftUI to create some custom UI, some of which is not resizable so I wanted to use showsLargeContentViewer=true as you can with any UIKit view. Is there a way to do this with SwiftUI views? If there is I haven't found it. Thanks
Posted Last updated
.