Post

Replies

Boosts

Views

Activity

AppShortcutsProvider triggered for unsupported OS
Hi! I have an AppShortcutsProvider that has been marked @available(iOS 17.0, *), because all Intents used within it are only available in iOS 17. So the static var appShortcuts should only be accessible in iOS 17, obviously. Now this code has been released and works fine for iOS 17 users. But I just noticed that around 150 iOS 16 users have crashed in the static var appShortcuts, or more specifically, the defaultQuery of one of the Intents. This should not be possible, as neither the AppShortcutsProvider, nor the Intent is exposed to iOS 16, they are marked as @available(iOS 17.0, *). Any idea why this could happen? Here is the crash log: Crashed: com.apple.root.user-initiated-qos.cooperative 0 libswiftCore.dylib 0x3e178c swift::ResolveAsSymbolicReference::operator()(swift::Demangle::__runtime::SymbolicReferenceKind, swift::Demangle::__runtime::Directness, int, void const*) 1 libswiftCore.dylib 0x40bec4 swift::Demangle::__runtime::Demangler::demangleSymbolicReference(unsigned char) 2 libswiftCore.dylib 0x408254 swift::Demangle::__runtime::Demangler::demangleType(__swift::__runtime::llvm::StringRef, std::__1::function<swift::Demangle::__runtime::Node* (swift::Demangle::__runtime::SymbolicReferenceKind, swift::Demangle::__runtime::Directness, int, void const*)>) 3 libswiftCore.dylib 0x3e9680 swift_getTypeByMangledNameImpl(swift::MetadataRequest, __swift::__runtime::llvm::StringRef, void const* const*, std::__1::function<swift::TargetMetadata<swift::InProcess> const* (unsigned int, unsigned int)>, std::__1::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) 4 libswiftCore.dylib 0x3e4d9c swift_getTypeByMangledName 5 libswiftCore.dylib 0x3e50ac swift_getTypeByMangledNameInContext 6 MyApp 0x3f6b8c __swift_instantiateConcreteTypeFromMangledName (<compiler-generated>) 7 MyApp 0x640e3c one-time initialization function for defaultQuery + 146 (IntentAction.swift:146) 8 libdispatch.dylib 0x3eac _dispatch_client_callout 9 libdispatch.dylib 0x56ec _dispatch_once_callout 10 MyApp 0x64109c protocol witness for static AppEntity.defaultQuery.getter in conformance IntentAction + 124 (IntentAction.swift:124) 11 AppIntents 0x15c760 _swift_stdlib_malloc_size 12 AppIntents 0x19dfd4 __swift_destroy_boxed_opaque_existential_1Tm 13 MyApp 0x52dadc specialized ActionIntent.init(action:) + 41 (ActionIntent.swift:41) 14 MyApp 0x52df80 specialized static MyShortcuts.appShortcuts.getter + 17 (MyShortcuts.swift:17)
2
0
721
Feb ’24
AdHoc builds cannot be installed on >= iOS 16.4 devices
Hi! We're using AdHoc builds for internal testing and that worked fine for the last couple of years. Recently, we've noticed that the installation of those builds fails on all devices that have iOS 16.4 or iOS 16.5 installed. When tapping on the icon, iOS shows an alert saying "Unable to Install APPNAME. This app cannot be installed because its integrity could not be verified" The same builds can be installed normally on all devices that are still on 16.1, 16.2 or 16.3. We're building using Xcode 14.3, devices are registered correctly and developer mode is enabled everywhere. Did someone else run into this issue? Thanks, Klemens
4
0
1.8k
May ’23
UILabel with pattern image textColor can't be made accessible
Hi there, I wanted to make a UILabel with a gradient as its text color, and its fairly easy doing it like this: let gradientImage = ... // Create a Gradient image using CAGradientLayer label.textColor = UIColor(patternImage: gradientImage) Problem is that as soon as I set this pattern image color, the UILabel is not accessible anymore. So isAccessibilityElement is set to false and I have no way of changing this back. The issue doesn't lie in the gradientImage, as using any other image as the patternImage for the textColor results in the same issue. Did anyone else experience this before and knows a way around this? Thanks, Klemens
3
0
1.7k
Apr ’22
Get name of sender of a message in group session
Hi there, when awaiting a message through an GroupSessionMessenger, I can get the Participant who sent the message through the context.source. But is there any way to get the actual name of that Participant? I haven't seen any way - but I guess it would have to go through the Contacts API? The reason I need this is because of the VoiceOver support in my app. If a Participant triggers an interaction, I would like to announce who triggered the interaction instead of just announcing "Someone did XY". Best, Klemens
1
0
1.4k
Sep ’21
Is changing the GroupActivity by replacing still the preferred way?
Hi there, I'm currently trying to implement SharePlay for one of my apps. Thanks to session wwdc21-10187, most of it went pretty smoothly. But at the end of the video, Adam talks about how to change activities and that's where I now struggle. He says that it is the preferred way to just replace the GroupActivity and demonstrates it for the reset button of the DrawTogether app. But this causes some behavior in iOS 15.1 that I would rather avoid. Let's say we have a FaceTime call with two participants, A and B and use the DrawTogether app. A starts the GroupActivity. If A now resets the canvas, a notification stating Started Draw Together will appear for both users. This is not super nice, but I could live with that. But if B wants to reset the canvas, B will see an alert that states: Replace Draw Together? This will end the existing SharePlay activity and start a new one , with the option to "Replace Existing" or "Cancel". This will most likely throw the user B off - B just wanted to clean the canvas and stay in the same session (they shouldn't even need to think about sessions) So my question is - Is changing the GroupActivity by replacing it still the preferred way if we want to have a clean slate? And if it is, how can I get rid of that alert that B sees? This is probably possible by actually doing the replacement through A (so through the GroupActivity "creator/owner"), but as far as I saw it in the documentation, there is currently no way to get that "owner", right? To give a bit more context - I have an app where participants go through lessons together. They do not care about the history of completed lessons, every lesson should start from a clean slate. Through interaction, any participant could trigger the progression to the next lesson and so it is pretty distracting if this progression is interrupted by the aforementioned alert. BTW: The code example is great, but as someone already noted over here, it does not compile since the API changed a bit (currently on iOS 15.1, but it was already broken before that). Thanks! Klemens
1
0
1.1k
Sep ’21
NSPrintInfo paperSize cannot be customized under Big Sur anymore
Hi there, I have a question about printing under Big Sur. We are offering support for a bunch of custom paper formats, updating the NSPrintInfo by creating a custom PMPaper, creating a PMPageFormat, setting it to the printInfo and then calling updateFromPMPageFormat. This worked perfectly fine over the years, but has stopped working under Big Sur. The print preview in the NSPrintPanel is still displaying the resulting file correctly and saving it as PDF also gives us a file with correctly sized pages. But since Big Sur, printers we've tried fail to print on custom sized paper from our app. The error seems to indicate that the printer thinks the file is in A4. Interestingly, the printSettings of NSPrintInfo now holds has a value of "A4" for the key com_apple_print_PageToPaperMappingMediaName. There is no documentation around that key though and I can't seem to figure out where its coming from in the first place. Also can't see any API changes we would need to adapt to for Big Sur. Any ideas what we're doing wrong here?
0
0
649
Dec ’20
Adjust the threshold for creating a new scene via drag and drop
Hi there, I have a question about creating new scenes via drag and drop. Let's say I have an app with a custom view that goes edge to edge. The view is split horizontally in 10 equally sized containers, where each container holds multiple items. Items can be moved in between the containers with an UIDragInteraction/UIDropInteraction. If I want t see the details of an item, I tap on it to get a popover. So far the dummy app. Now say I want to add multi-scene support to the app and allow creating a new window that shows the details of an item by dragging it to the far left or far right part of the screen. As soon as I allow this (by adding an URL representation of the dragged item with my custom URL scheme), I am not able to drag items anymore to the leftmost or to the rightmost container. As soon as I'm closer than ~75px to either edge, the system thinks I want to create a new scene as a popover. Is there any way to thin down that threshold of ~75px? Or any other way to tell the system that this drag is still relevant to the underlying UI and no window should be created yet? My assumption is that there is no way to adjust it, but I hope I'm wrong here. It would be a shame to remove the feature to create new scenes via DnD, but with that big of a threshold, it seems to be impractical for my app. Best, Klemens
0
0
640
Sep ’20
Insertion point when delaying focus of UIIndirectScribbleInteraction
Hi there, I'm currently playing around with Scribble and ran into an odd behavior. Let's say I have an app where I can scribble on a canvas. After scribble has finished, a custom view with a textView should appear and the scribbled text should be forwarded to the textView. Depending on where I wrote on the canvas, additional info is forwarded to the view and put in as a prefix for the textView. That at least was the idea. To implement this, I've added a UIIndirectScribbleInteraction to the canvas and implemented the UIIndirectScribbleInteractionDelegate. When the focus is requested through indirectScribbleInteraction:focusElementIfNeeded:referencePoint:completion:, I bring up the custom view, insert the prefix based on the referencePoint into the textView, make it become firstResponder and hand over the textView in the completion block. Now since the appearance of that custom view is pretty disruptive, I return true for indirectScribbleInteraction:shouldDelayFocusForElement:. And here is where the problem starts. As soon as I do that, the scribble input is always inserted at the start of the textView, so in front of my prefix. If I do not delay the focus and insert my prefix, the scribble input is correctly appended after the prefix. I do not fully understand why delaying the focus should change the behavior here. Scribble always only gets to know the target textView through calling the completion of indirectScribbleInteraction:focusElementIfNeeded:referencePoint:completion:, and before completion is called, the prefix is inserted. So I feel like scribble should be able to see that there is already text inside that textView and append its text, instead of inserting it into the front. I would welcome any clarification on my issue :) Thanks, Klemens
2
0
1k
Aug ’20
Update UIDragPreview during DragInteraction
Hey,during my drag, I need to update the UIDragPreview of the dragged item depending on it's location. I'm currently doing that by setting a new previewProvider each time the preview needs to be updated. When doing this, the current preview gets scaled down a little bit and the new one scales up, which looks a bit weird.Is there a better way to update the DragPreview? Or is there at least a way to get rid of the scaling?Best,Klemens
2
0
1.2k
Aug ’17