Posts

Post not yet marked as solved
4 Replies
701 Views
I have a large custom NSView subclass that's set as an NSScrollView's documentView. This view achieves zooming in the standard AppKit way, by having a bounds size that's some factor of the frame size, eg: frame.size.width = bounds.size.width * 2.0. This has worked just fine for years. The problem is that on modern versions of macOS (eg: Catalina), for certain zoom factors, there are "seams" that show up during drawing. The seams are fine lines that show a view's background color (or stale content from a prior drawing pass). The seams are always aligned in neat rectangular patterns, which tipped me off that macOS is doing some kind of tiling. After poking around I see that my view is assigned a CALayer, despite never opting-in via setWantsLayer or anything like that. This implicit layer backing seems to be expected on current versions of macOS, but it's definitely the cause of my problem. I can see that my view is assigned a layer like: \_NSViewBackingLayer → sublayers: \_NSTiledLayer If I increase the tileSize property of this automatically generated layer (eg: from 512x512 to 2048x2048), I can decrease the visual frequency of the problem. But this is naturally a hack, and not a complete solution. The seams still occur, just less often. Can I somehow opt my view out of implicit layer backing? Is there a more modern way to implement zoom now that everything is using layers?
Posted
by MartinW.
Last updated
.
Post not yet marked as solved
1 Replies
2.4k Views
Is there any way to download attachments in the macOS Feedback Assistant app? I'm trying to confirm some issues are fixed (or not), but I need the test files I attached to my previously submitted bug reports. Perhaps I'm missing something obvious? I looked in the help / user guide, but all it talks about is Drafts. I need files from earlier bug reports, not Drafts.
Posted
by MartinW.
Last updated
.
Post not yet marked as solved
12 Replies
3.9k Views
I'm preparing a sandboxed app for macOS Catalina and adopting the hardened runtime, so I can participate in app notarization. Everything is generally working except for a child process my app sometimes needs to launch using NSTask. This child process is also sandboxed, inheriting the sandbox from its parent (the main app).The problem is that the child process requires special entitlements to function. Specifically I'm referring to new hardened runtime entitlements like com.apple.security.cs.disable-library-validation. However, if I add such entitlements to the child process it fails to launch. This is somewhat expected, as the child process inherits the parent app's sandbox (via the entitlement com.apple.security.inherit). As described by Apple's documentation on inheriting a sandbox: "If you specify any other App Sandbox entitlement, the system aborts the child process". That means I am unable to directly add hardened runtime entitlements like com.apple.security.cs.disable-library-validation to the child's entitlements. As the docs say, adding the new entitlements prevent the child process from running at all.I thought maybe the child process could inherit the required hardened runtime entitlements from its parent. I tried adding com.apple.security.cs.disable-library-validation to the main app's entitlements, hoping the child process would inherit the capability. However, this appears to be untrue. My child process failed as if the required entitlement was not present.My questions are:1. Is this expected? In other words, should a child process with an inherited sandbox also inherit its parent's hardened runtime entitlements?2. Is there any way to workaround this, so the child process can be sandboxed and use additional hardened runtime entitlement?Right now I am stuck at an impasse. I can either sandbox the child process or specify the hardened runtime entitlement, but not both. This prevents app notarization, which obviously will be a big problem once Catalina arrives.Thanks for any help!
Posted
by MartinW.
Last updated
.