Post

Replies

Boosts

Views

Activity

Unwanted debug messages
I always get the following debug messages when I debug a simple test app: 2021-02-03 06:27:08.068287+0800 objcapp[4385:33065] Metal API Validation Enabled 2021-02-03 06:27:09.530861+0800 objcapp[4385:33767] Errors found! Invalidating cache... 2021-02-03 06:27:09.970280+0800 objcapp[4385:33767] Errors found! Invalidating cache... 2021-02-03 06:27:10.899920+0800 objcapp[4385:33065] VPA info: plugin is INTEL, AVD_id = 1080004, AVD_api.Create:0x112d415d7 2021-02-03 06:27:10.971477+0800 objcapp[4385:33065] VPA info: plugin is INTEL, AVD_id = 1080004, AVD_api.Create:0x112d415d7 2021-02-03 06:27:10.991057+0800 objcapp[4385:33065] VPA info: plugin is INTEL, AVD_id = 1080004, AVD_api.Create:0x112d415d7 This began a few versions ago of macOS updates/upgrades. Is there any way to get rid of these messages? They are really interfering my focus on coding and debugging.
0
0
825
Feb ’21
NSView and dynamically created subviews
I have a custom view that acts as a container for many NSImageViews that will be created dynamically on the fly. When the container view is resized (by parent window), some new subviews may be created and added to the container view, or some subviews may be removed because they are not fit into a smaller view. I have two ways to handle the 'disappearing' subviews. One way is to hide them, the other is to remove them from the container view. My concern is that - Is there a (big) performance difference between the two methods? Which is better?
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
410
Mar ’23
How extract files in Assets.car?
I got a few answers from SO, but the tools are too old and they don't even run my macOS (12.6). Is there any official way to extract an Assets.car file? The reason I ask this question is that I want to re-use the icons for strings/storyboard files in Xcode packaged Assets.car (if it's legal).
0
0
980
Sep ’23
Is it safe to call low level Darwin function on FileHandle?
I have the following code: extension FileHandle { func readInto(_ buffer: inout [UInt8]) -> Int { buffer.withUnsafeMutableBytes { Darwin.read(fileDescriptor, $0.baseAddress, $0.count) } } } It can compile, but I wonder if this is supported since it's code in an app that is going to be submitted to App Store. The reason I don't use read(upToCount:) or readData(ofLength:) is that I am reading possibly very large files by small chunks and don't want to let Swift runtime allocate small buffers repeatedly.
0
0
307
Nov ’23