Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Discuss hardware-specific topics related to Mac.

Posts under Mac tag

41 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

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
68
3w
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
41
3w
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
41
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
39
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
112
Mar ’25
Button's image not Visible in mac-catalyst project
Currently I came across an issue in mac catalyst project. All the buttons in my project are not visible, they are in their actual positions and also clickable and performing their tasks as assigned but they are not visible. When Iam doing: crossButton.setImage(UIImage(named: "CrossComMac"), for: .normal) Button does not contain image While in the below code, image is visible but Iam not able to resize it. crossButton.imageView?.image = UIImage(named: "CrossComMac") Also title of the button is not visible too. Anything related to button in my mac catalyst project is not visible. Main issue: Button's image is visible in Xcode running project Button's image is not visible in build project...(funny thing right)
1
0
360
Feb ’25
Pages continues to crash
Process: Pages [24164] Path: /Applications/Pages.app/Contents/MacOS/Pages Identifier: com.apple.iWork.Pages Version: 14.3 (7042.0.76) Build Info: Pages-7042000076000000~4 (1A80s) App Item ID: 409201541 App External ID: 869633787 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2025-02-03 10:33:48.0108 -0500 OS Version: macOS 15.0 (24A5264n) Report Version: 12 Anonymous UUID: CADF4BC4-9940-34D7-7009-116B6231DC3E Sleep/Wake UUID: 74C42190-FF06-46AE-B3A5-A3EBD47E7F1F Time Awake Since Boot: 350000 seconds Time Since Wake: 720 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [24164] VM Region Info: 0 is not in any region. Bytes before following region: 4336156672 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 102748000-1039a0000 [ 18.3M] r-x/r-x SM=COW /Applications/Pages.app/Contents/MacOS/Pages Model: Mac14,2, BootROM 11881.0.80.0.2, proc 8:4:4 processors, 8 GB, SMC Graphics: Apple M2, Apple M2, Built-In Display: Color LCD, 2560 x 1664 Retina, Main, MirrorOff, Online Memory Module: LPDDR5, Hynix AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Apr 22 2024 07:25:15 version 20.10.1110.0.8.7.176 FWID 01-f2e48c5b IO80211_driverkit-1302.55 "IO80211_driverkit-1302.55" May 30 2024 20:56:50 AirPort: Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Air, Apple Inc. Thunderbolt Bus: MacBook Air, Apple Inc.
1
0
200
Feb ’25
"Create Your Apple Account" Not Working
I just got a new 2024 Macbook Pro today. I finished setting it up, and I'm trying to reinstall a few apps. It told me that since I haven't used my Apple ID yet, I need to complete my Apple account. I've entered all my address information, but every time I hit continue, the boxes turn red, telling me I need to enter my information as if I never entered it in the first place. How can I fix this? I need to set this computer up before classes tomorrow.
1
0
210
Jan ’25
what's wrong
i never imagined that an apple product could do such. a thing . i 've updated to the latest version , 15.3 what should i do next time? i've had to restart it three times, the last one finally helped here is the link https://youtu.be/-aqjzVKMZGA
0
0
235
Dec ’24
Too sensitive trackpad?
My post i the general forum was deleted because I am running on Sequoia beta. The issue seems to occur regardless of macOS version. MacBook Air (M1, 2020): Trackpad reacts to the slightest touch, either moving thw cursor or clickin. Obviously I have adjusted settings and it's still too sensitive. If I don't take my fingers completely away from the trackpad as I use it, I often find new windows opening, dialog boxes popping up, ads getting clicked on, etc. I have gone into trackpad preferences several times and adjusted everything I can find that ought to help and it doesn't. Disabling “touch to click” remedies the unintentional clicks, although I would like to keep that functionality of workin as intended. The other nuisances remain.
2
0
433
Dec ’24
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
970
Mar ’25
Crash report - WD Unlocker
I can't unlock my extern device. I have the followed crah report as I try to enter my password. The device was once used on a microsoft computer, idk if it's linked somehow. Does anyone know what to do ? Translated Report (Full Report Below) Process: WD Drive Unlock [1303] Path: /Volumes/VOLUME/WD Drive Unlock.app/Contents/MacOS/WD Drive Unlock Identifier: com.westerndigital.WDDriveUnlock Version: 2.0.0.45 (2.0.0.45) Code Type: X86-64 (Translated) Parent Process: launchd [1] User ID: 501 Date/Time: 2024-11-23 11:49:58.9117 +0100 OS Version: macOS 14.3.1 (23D60) Report Version: 12 Anonymous UUID: 867E7C29-A5F7-9384-C84A-E8DD7E31CF51 Time Awake Since Boot: 270 seconds System Integrity Protection: enabled Notes: PC register does not match crashing frame (0x0 vs 0x7FF80BA0BF60) Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [1303] VM Region Info: 0 is not in any region. Bytes before following region: 4294967296 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 100000000-100011000 [ 68K] r-x/rwx SM=COW ... Drive Unlock Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x7FF80BA0BF60)
1
0
318
Dec ’24