Discuss hardware-specific topics related to Mac.

Posts under Mac tag

39 Posts

Post

Replies

Boosts

Views

Activity

NSTextField content not visible when NSView's frame exceeds screen width in macOS 26 (Tahoe)
Hi, I have encountered a strange issue on macOS 14 (Sonoma). I am creating a barrage (danmaku) effect: I have an NSView called BarragePipe which is a long horizontal rectangle (width = 50000). I treat this view as a "train" moving from right to left with animation. I add subviews (BarrageItem, which are also NSViews with text) to this "train." The background of BarragePipe is set to transparent, so visually it looks like the text items are moving across the screen. Here's the problem: On macOS 14, only the BarrageItem views whose X position is between 0 and the screen width display their text correctly. If a BarrageItem is positioned with X > screen width, its background still renders, but the text does not appear. This did not happen on previous macOS versions. It seems like the system is optimizing rendering for off-screen views. Has anyone encountered this? Is there a workaround to make the text always visible, regardless of the view's frame position? Thanks!
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
10
3d
Mac OS X App for collecting linear displacement of a sample
I have a small furnace that heats a sample of my product, a cylinder measuring 20mm x 100mm. As it is heated, there is thermal expansion, and I at this moment read (using my eyes) a micrometer dial gauge and type into my app the value read in hundredths of a millimeter. My source code uses quartz to draw a PDF graph that represents this thermal expansion. I would like to enhance my set up by getting my app to collect the linear displacement from my dilatometer furnace. One possibility I have been trying to implement is to have my app collect DC millivolts from an instrument, like a voltmeter reading the output of an LVDT (Linear Variable Differential Transformer), but the model I have requires MODBUS-RTU protocol, which is not well implemented by Mac OS X developers. It requires an USB-Serial converter, which complicates things and makes it more unreliable. At this moment, I have to sit next to my furnace and type into my app the temperature and linear displacement for 3 hours. I would like to read some comments and suggestions from you or an Apple Engineer and how this could be achieved. Here is a video of my dilatometer furnace: https://www.correiofacil.com/video/IMG_8888.MOV Here is a PDF I generated using my APP: https://www.correiofacil.com/PDF/117.pdf Here is a video showing how I type data manually into my app: https://www.correiofacil.com/video/recording2.mov Here is a video that shows my app drawing a graph: https://www.correiofacil.com/video/recording1.mov These 2 images show my attempts to use the app ModBusRtuMaster to collect data from the voltmeter which at this moment fails: https://www.correiofacil.com/PDF/8f9be971dee32a58c36b307dbab3dc2d.png https://www.correiofacil.com/PDF/4ac20c2ea762fd42ed340a7a2b567900.png You will notice that although the instrument is displaying 0.000 volts, the data collected changes at each message I send to the instrument, proving me that Modbus RTU set up is not working. Here is a link to the manual of the DC voltmeter I am using: https://www.correiofacil.com/PDF/manual1.pdf Here is an image of the LVDT I am trying to use: https://www.correiofacil.com/PDF/e0349986512f9273b26b209baa3ba5c7.png Here is the manual for the LVDT: https://www.correiofacil.com/PDF/GGD19.pdf I suspect that there could be a completely different approach to collecting the data and inputting into my app, maybe Bluetooth? Maybe using a Mitutoyo gauge such as? This: https://www.mitutoyo.com/Images/CatalogUS-1003/resources/_pdfs_/US-1003_Catalog_251.pdf And a cable with SPC support like this: https://www.gw-style.com/product-p-942977.html I am very grateful for your comments
3
0
54
6d
Icon for some menu items cannot be removed on macOS 26
create a sample XCode project using Objective-C and stroybook (xib) using latest XCode beta open MainMenu.xib, and select Main Menu → File → Print... remove the image like below 4. build it 5. run it on macOS 26 beta 7 6. The menu item "print.." still have "Image" Is there any way to remove image for one menu item. I have also tried NSMenuItem.image = nil, but still not work. The issue I met on my own app is that I cannot remove icons for "Zoom In", "Zoom Out" and many other menu items, which makes the menu items not aligned properly.
1
0
144
1w
macOS sequoia docking station sporadically disconnects
After recently updating my MacBook Pro (14-inch, 2021, M1 Pro) to macOS Sequoia (15.6), my docking station sporadically disconnects and reconnects about once every 1-5 minutes. This causes my external screens to switch off for about a second, and my external drive to disconnect. This has (obviously) completely broken my workflow, and I've had to resort to connecting two screens directly to the MacBook. I've had to completely disconnect the external drive for fear of corrupting due to the sudden disconnects. I've seen other people report the same or similar issues here, and other places. I've tried all kinds of fixes suggested on various forums (reinstalled drivers, cleared preference files, etc.) without any luck. To be frank, this is a completely unacceptable bug that needs to be fixed ASAP. I cannot accept that installing an os update completely breaks something as fundamental as connecting to external devices via a docker. Especially when this worked completely fine on macOS 13, and I was essentially forced to update because the (working) macOS 13 was no longer supported.
1
0
105
1w
HomePod Mini Beta Device Issues: Power, Connectivity, USB Recognition
Hi! Short time lurker, and first time poster, but I will try to be as descriptive as possible. I have had my HomePod mini since 2021, and have been loving it. Recently, though, I am facing issues which have paralyzed it. Background: Running two HomePod Minis under a stereo pair on the same network in a room. Devices worked well, with the odd dropping of the sound once a while, not too big of an issue. Started running HomePod OS26 beta in July to see what the new updates have, and maybe if the audio issues would be resolved. Issue: Two weeks ago, the after the (then) latest update, there was a no response issue in the app. No big deal, let's just restart the HomePod pair. After restart, no bueno. I also got a new beta software update notification, so decided if I updated them both, the issue will probably be resolved. No dice. The issue persists. So I decided to pair the HomePods and factory reset them. Both HomePods disappeared from my home app. Regular behavior. Going to reset them with the old unplug for 30 s, replug into power, hold finger on the display had no issues for the first one. For the second HomePod, unplug, hold, and plug in. Problems. No display. Tried it a bunch of times, nothing. Waited a day, in case the capacitors needed to be discharged for it to do a cold boot. Nothing. Looking across the interwebs, I found that we can connect the HomePods to Macs, have them show up on Finder, and update from there. Connecting into the Mac, nothing. Waited for the caps to discharge before engaging again, nothing. Now, I fear I may have problems. So I scheduled a meeting at the Genius Bar. Genius Bar individual said no support as you are running beta software. We are not allowed to touch or diagnose those devices. They also said that there are no external facing endpoints for us to diagnose or check. I would have better luck with online Apple Support or over call with Apple Support. Okay, sounds good. Contacting Apple Support, they said that we will have to wait for the official release of HomePodOS 26 for us to support you, to which I agreed. During this time, I thought about seeing if I could troubleshoot and see if anything was coming out of the HomePod when connected to the Mac. So I wrote a script, querying and logging different aspects of the USB controller on the Mac and seeing what device connects. I removed all other USB devices connected to the Mac, and started the script. First, I connected and disconnected the HomePod a couple of times, and on the last connect, I left it in, and let the script record the readings. Reading the output told me that there was indeed a device that was connecting and disconnecting. Here are some of my findings: Port Readout Summary Apple's UVDM stack lights up on the Port-USB-C@2 (CC path, SOP) AppleUVDM driver tried to read identity VDOs, initially rejected, then carried on and the transport finished powering on successfully. Furthermore, the VDM read attempts itself are rejected, typical when the accessory is gating Apple specific commands The CC transport merged metadata for SOP with a 3-VDO identity set. The CC property change during the run indicates an active PD negotiations. USB link states also toggled on that port with driver status Ready Port-USB-C@2/SOP shows Vendor ID and Product ID (not sure if this is private information, so not sharing) Port-USB-C@1/SOP, the e-marker in the HomePod cable shows the same, with product type "Passive Cable" Only CC is flagged "TransportsActive" Apple's accessory authentication stack is present The USB speeds on the port flicker between Gen 3 and Gen 2, indicating to me some sort of handshake failing in the stack, which is preventing enumeration in the System Report and Finder This likely is indicating to me that the target isn't enumerating as a normal USB device, but rather as a USB-PD Vendor Defined Messaging (UVDM) protocol on the CC line. Furthermore, the signature is in a "hidden" service/update modes, which does not enumerate standard USB functions. So, having all this information available to me, I got on a call with Apple Support today, and they went through some of the troubleshooting steps and told me that they could neither escalate the issue (due to it being on a beta software that THEY DO NOT SUPPORT) nor remediate or troubleshoot the issue (as it is an accessory) and the only thing their support options say is to wipe the device, as it is something that is not supported. Upon my suggestion of this my USB logs being used to review the case, they said my personal USB logs would be detrimental towards my case. Their final recommendation was for me to reach out to Apple Developer support as I am running beta software on this HomePod Mini. So, here I am! I highly believe this is a Software issue, contrary to what Apple Consumer Support call representative indicated. All and any help/guidance and support is appreciated. All and any help in boosting the visibility of this issue on the forums would also be greatly appreciated. I have had these bad boys since my undergrad, and I would hate to lose one of them. For Apple Support, before you lock and close this post down and recommend I go to Apple Consumer Support, they said that they cannot help me, and consumer support steps start and end at resetting the device.
0
0
188
2w
EtreCheck (from Etresoft, Inc)
Hello I've noticed that this product, heavily promoted on the ASC forums for many years, is no longer available from the Apple App Store. Can anyone tell me the reason why the product is no longer supported? Friends have asked me if it is 'safe' to use. Is it? Note to moderator: If I'm asking in the wrong places, please redirect my question. Thank you.
9
0
5.1k
Aug ’25
The volume on diskN couldn't be unmounted because it is in use by process 0 (kernel)
I am on Macos Sequoia 15.5. I plugged in a brand new 8TB SanDisk SSD portable drive. I want to reformat it. Diskutility fails in this way: Erasing "SanDisk Extreme Pro 55AF Media" (disk6) and creating "NewDrive" Unmounting disk The volume on disk6 couldn't be unmounted because it is in use by process 0 (kernel) Couldn't open device. : (-69877) Operation failed… I have the drive ejected. I'm used to ejecting a drive, then unplugging it. The first time I tried this, DiskUtility complained that all sorts of processes were using it still, after I Ejected the drive (Bash, simctl, Code Helper, Word, kernel 0). So I closed all the process one by one, until only kernel proc 0 was remaining. Apparently it is not safe to simply eject a drive and then unplug it, as Eject "succeeds" but many processes still have the drive open. How do I format the drive?
1
0
83
Aug ’25
MacBook Air (M2, 2023) Randomly Freezes After Sleep – Black Screen with Cursor Only
Since a recent macOS update (around one month ago), I’ve been experiencing a random issue on my MacBook Air (2023, M2). After the device enters sleep mode and I try to wake it, sometimes the screen stays black with only the cursor visible. The issue occurs randomly — not every time — but frequently enough to impact daily use. The system becomes completely unresponsive, and the only recovery method is a forced restart (holding the power button). Steps to Reproduce: 1. Leave the MacBook idle until it enters sleep automatically. 2. Wait for 10–30+ minutes. 3. Attempt to wake it using the keyboard, trackpad, or by opening the lid. 4. Randomly, the system fails to wake properly: screen turns on, shows a black background with a movable cursor, but nothing else appears. Expected Result: The system wakes normally and restores to the previous desktop session. Actual Result: The system randomly freezes on a black screen with a visible cursor. No user interface or login prompt appears. Requires a hard restart. System Information: • Device: MacBook Air 13”, M2, 2023 • macOS Version: [Insert exact version, e.g., macOS Sonoma 14.5] • Issue Since: Around one month ago (possibly after latest macOS update) • Peripherals: [Mention any external devices if applicable] • Reproducibility: Random (approximately 30–50% of the time after longer sleep) Additional Notes: • Issue is not consistent; sometimes the system wakes as expected. • Occurs regardless of whether on battery or plugged in. • No external monitors or USB accessories are connected when this happens.
1
0
148
Jun ’25
Appstore Connect, Plus button on appearing next o build section
I just wanted to update my app, as it seems the in-app purchases were not updated in the first submission. I created a new build and increased the version number by a minor increment, from 1 to 1.1, to ensure it gets processed. The build appears in TestFlight, but the plus button adjacent to the "Build" subsection does not appear, preventing me from selecting a new version. Please see the attached images. VERY VERY FRUSTRATING
2
0
83
Jun ’25
Crash when minimizing on external display and unplugging it (iOS App on Mac)
Our iOS app, when running as an iOS App on Mac, crashes consistently under the following scenario: 1. Launch the app on an external display. 2. Minimize the app window. 3. Disconnect the external display. The app crashes every time under these conditions. The crash log shows the following call stack: *** Assertion failure in -[UINSWorkspace _maximumContentSizeForWindowOnScreen:], UINSWorkspace.m:401 -[UINSWorkspace _maximumContentSizeForWindowOnScreen:]: screen parameter should not be nil ( 0 CoreFoundation 0x000000018e841df0 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000018e306b60 objc_exception_throw + 88 2 Foundation 0x000000018fb6aa78 -[NSCalendarDate initWithCoder:] + 0 3 UIKitMacHelper 0x00000001a9a59110 -[UINSWorkspace _maximumContentSizeForWindowOnScreen:] + 184 4 UIKitMacHelper 0x00000001a9a3e748 -[UINSSceneViewController _usableScreenSizeWithSceneSize:shouldOverride:] + 412 5 UIKitMacHelper 0x00000001a9a3d55c -[UINSSceneViewController _effectiveScaleFactorForLayoutWithOverride:] + 88 6 UIKitMacHelper 0x00000001a9a3f3a8 -[UINSSceneViewController _updateZoomFactors] + 28 7 UIKitMacHelper 0x00000001a9a3f248 -[UINSSceneViewController _updateZoomFactorsAndDoLayout] + 24 8 UIKitMacHelper 0x00000001a9a3df80 -[UINSSceneViewController _doUpdates:] + 104 9 UIKitMacHelper 0x00000001a99ad460 -[UINSSceneViewController observeValueForKeyPath:ofObject:change:context:] + 176 10 Foundation 0x000000018facb0d8 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 388 11 Foundation 0x000000018facb0d8 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 388 12 Foundation 0x000000018fa8f7b4 NSKeyValueNotifyObserver + 252 13 Foundation 0x000000018fb3c560 NSKeyValueDidChange + 388 14 Foundation 0x00000001903149a0 NSKeyValueDidChangeWithPerThreadPendingNotifications + 160 15 AppKit 0x00000001924673d4 -[NSThemeFrame _didChangeContentLayoutRect] + 76 16 AppKit 0x000000019246521c -[NSWindow _oldPlaceWindow:fromServer:] + 744 ) It seems like the system attempts to access a screen object that is already nil after the external monitor is removed. This leads to an assertion failure in UINSWorkspace. Is there any known workaround or update planned to address this issue? Thank you.
2
0
69
May ’25
Some questions about custom email domain names with iCloud+ Mail
In the actual development, I found that I could not complete the setting of my icloud+ customised email domain name SMTP. I tried to configure the SMTP of iCloud custom email according to Apple's document (https://support.apple.com/en-us/102525) but the error I looked through Apple's support file, but I didn't find the specific configuration of iCloud + customised email SMTP.
0
0
94
May ’25
Mac can't find or register NE App Extension without App Sandbox entitlement
Recently, while developing a network extension on macOS, I encountered a very interesting issue. When the App Sandbox entitlement is included, the NE (Network Extension) can be called and run normally. However, when the App Sandbox is removed, with everything else remaining unchanged, an error occurs. The logs are as follows: Failed to find an app extension with identifier app.acmeVpnM.extension and extension point com.apple.networkextension.packet-tunnel: (null) Found 0 registrations for app.acmeVpnM.extension (com.apple.networkextension.packet-tunnel) If you add app sandbox, it will run normally. this is my container app entitlement this is my NE extension (without App SandBox) I want to know the reason for this. App sandbox shouldn't be mandatory. How can I make my NE run in an environment without app sandbox?
2
0
83
May ’25
Opening a New Document from File URL?
I have a sample document-based macOS app. I understand that you can open a new window or a new tab with some text. import SwiftUI struct ContentView: View { @Binding var document: TexDocument @Environment(\.newDocument) var newDocument var body: some View { VStack(spacing: 0) { topView } } private var topView: some View { Button { newDocument(TexDocument(text: "A whole new world!")) } label: { Text("Open new window") .frame(width: 200) } } } Suppose that I have a path to a text file whose security-scoped bookmark can be resolved with a click of a button. I wonder if you can open a new window or a new tab with the corresponding content?. I have done that in Cocoa. I hope I can do it in SwiftUI as well. Thanks.
1
0
70
May ’25
Reliable APIs to check if a Hotkey/Shortcut is already in use?
In our application we have two usecases for a Hotkey/Shortcut identification API/method. We have some predefined shortcuts that will ship with our MacOS application. They may or may not change dynamically, based on what the user has already set as shortcuts/hotkeys, and also to avoid any important system wide shortcuts that the user may or may not have changed. We allow the user to customize the shortcuts/hotkeys in our application, so we want to show what shortcuts the user already has in use system-wide and across their OS experience. This gives rise to the need for an API that lets us know which shortcut/hotkeys are currently being used by the user and also the current system wide OS shortcuts in use. Please let me know if there are any APIs in AppKit or SwiftUI we can use for the above
0
0
136
Mar ’25
Detecting DarkWake and Maintainance Sleep transitions
On a macOS machine running v15.0, I have a daemon run by launchd which subscribes to the sleep and wakeup notifications using the IORegisterForSystemPower method. void PowerCallBack(void* refCon, io_service_t service, natural_t messageType, void* messageArgument) { switch (messageType) { case kIOMessageSystemWillSleep: logger->Debug("Received sleep notification from macOS"); if (refCon) { //Handle Sleep } IOAllowPowerChange(root_port, (long)messageArgument); break; case kIOMessageSystemHasPoweredOn: logger->Debug("Received wakeup notification from macOS"); if (refCon) { // Handle Wakeup } break; default: break; } } void MacOSNotification::RegisterNotifications() { logger->Debug("Registering for notifications from macOS"); powerNotificationThread = [[NSThread alloc] initWithBlock:^{ // Notifier object, used to deregister later root_port = IORegisterForSystemPower(this, &notifyPortRef, PowerCallBack, &notifierObject); if (root_port == 0) { return; } logger->Debug("Registered for system power notifications from macOS"); // Add the notification port to the application runloop CFRunLoopAddSource(CFRunLoopGetCurrent(), IONotificationPortGetRunLoopSource(notifyPortRef), kCFRunLoopCommonModes); CFRunLoopRun(); }]; //END OF THREAD BLOCK [powerNotificationThread start]; } Using this mechanism, I am getting notifications for normal sleep and wakeup transitions like closing and opening the lid. I need these notifications to terminate/reconnect my connection to a cloud service when we go to sleep/wakeup respectively. I have noticed from the power logs at /private/var/log/powermanagement that the after the sleep initiated by lid closing or clicking sleep in the top apple menu (both of which I can detect as they generate power notification), the macOS machine wakes up with the following message from powerd logs: DarkWake from Deep Idle [CDNP] : due to SMC.OutboxNotEmpty smc.70070000 wifibt/ I do not get any notification for this wakeup and my application threads start running. This happens every 15 to 16 mins from my observation. After this DarkWake, we go back to 'Maintenance' sleep in under a minute as can be seen by the following powerd log: Entering Sleep state due to 'Maintenance Sleep':TCPKeepAlive=active I do not get any notifications for this either. Is there a way to track and get notified of these DarkWake -> Maintenance sleep cycles? At the very least I would like to log when we go into and come out of these states. Currently I just rely on seeing a 15 min window of no logs to know this must have a DarkWake -> Maintenance sleep cycle. Also is there a way to make sure my application and its threads are not woken up by DarkWake (like an opt-out)? I would like to make it so that my application only runs when we are properly sleeping and waking.
5
0
1.1k
Mar ’25