Post

Replies

Boosts

Views

Activity

No proper replacement for LaunchServices functions
Apple deprecated launch service calls like LSCopyAllRoleHandlersForContentType, referring to -[NSWorkspace URLsForApplicationsToOpenContentType:] instead. However all those new NSWorkspace methods do not have the crucial LSRolesMask the launch service calls have. For example, I have code that looks up all alternative shells, and with LSCopyAllRoleHandlersForContentType I could simply provide LSRoleMask.shell to restrict the returned bundle identifiers to shells only. This is not the first time Apple deprecates stuff without a proper replacement and I don't really get it. Every OS update is basically a downgrade. Or is there another way to replicate the old launch service call behavior?
2
1
748
Nov ’23
TextKit2 textContentManager(_:shouldEnumerate:options:) leaves gaps in layout
Returning false from NSTextContentManagerDelegate.textContentManager(_:shouldEnumerate:options:) produces huge gaps in my layout instead of showing a continuous block of text. Instead of omiting the layout of the hidden element, there is a blank space that shows that appears to have the same size in layout as the omitted text element. Why is this happening and how can I prevent this? Example:
1
0
576
Sep ’23
How to hide LayoutView from a Layout?
I have implemented a custom Layout, specifically a label view that hides any trailing views that are clipped. Now in my placeSubviews() method - even if I don't explicitly place a view - SwiftUI will layout the view and show it. As there seems to be no way to hide a LayoutSubview, I have resorted to placing the view somewhere very far off screen like this let maxOffset = CGFloat.greatestFiniteMagnitude let offScreen = CGPoint(x: maxOffset, y: maxOffset) subview.place(at: offScreen, proposal: .unspecified) but I don't really like this solution. Is there an official Apple "sanctioned" way how to hide LayoutSubviews inside a Layout?
1
2
696
Aug ’23
macOS Big Sur: Executing subprocess results in container_create_or_lookup_for_current_user XPC_INVALID_REPLY error
We have an app with embedded binaries (git) in its bundle, that are started as subprocesses. On macOS 10.15 everything works just fine, the binaries are correctly signed and have the correct entitlements, however when running the app in Xcode on macOS Big Sur we get the following error when trying to run a subprocess. git[87505:437491] [unspecified] container_create_or_lookup_for_current_user: error = ((container_error_t)51) XPC_INVALID_REPLY\n Did something change in Sandboxing with 10.16/11.0? How do we resolve this?
0
0
733
Jul ’20