Post

Replies

Boosts

Views

Activity

Xcode hangs with iig
Xcode iig hangs. In the best case, the project will be in error - and Xcode cannot recover. To recover restarting Xcode may not help (force quit Xcode) - most of the time a restart of the Mac is required. Its speaks to software quality when "Clean build folder" is your best friend. Xcode iig hangs, and while its only using two of my MacStudio's 10 cores - the whole mac hangs (Activity monitor confirms, if it opens at all). If you are not quick enough to reboot the Mac will hang and require power down using power button. Don't use Finder to reboot because Finder hangs too and will not reboot - use terminal (sudo shutdown -r now). see screen dump below: super useful! After restart, Xode may refuse to launch. This is something I notice with my Java apps (jar launcher): If the app ends with an exit code (1, not 0 like normally) - it will not launch until I restart the Mac, in the meantime must launch the app from Eclipse. After restart, the crash reporter comes up - asking me to type a reason. When I type "iig" the auto-correct will change that to "big". This is so totally useful! MacOS 26.4.1 Xcode 26.3 apologies - its a lousy day when your Mac hangs and requires a restart - repeatedly; until I got my iig fixed up and Xcode fully aware with the actual content. iig error reporting is lousy; which makes fixing so extra hard.
0
0
27
1d
Driverkit driver hangs on macOS
Hello, I have crated a DriverKit driver for macOS and iPad M-series if I ever get the mac driver working. I have the correct entittlements, and matching provisioning profile downloaded manually. The driver loads (no errors!), and is visible in ioreg below the usb device (when plugged). The issue is that I never get any log from the driver, have reduced to minimal working code (below). When I debug with lldb, I load the symbols for my driver and break on init and Start - but lldb never triggers == never calls start or init. This is also why no logs. When I unplug the device, the driver process (ps aux) keeps running, causes a hard crash of the Mac with dext remove/or kill driver.dext process. I have asked Claude - but its just running in circles: check Info.plist=ok, check entitlements=ok, check code (minimal)=ok, check iig=ok, check provisioning profile=ok, check build settings=ok, check ioreg=ok, check code signature=ok, start over I don't get any log from my driver, which is consistent with init() not being called. All logs from kernel & friends (AMFI) do show the driver loading - no errors. Any tips appreciated! // USBDriver.iig #ifndef USBDriver_h #define USBDriver_h #include <USBDriverKit/IOUSBHostInterface.iig> class USBDriver: public IOService { public: virtual bool init() override; virtual void free() override; virtual kern_return_t Start(IOService * provider) override; virtual kern_return_t Stop(IOService * provider) override; }; // USBDriver.cpp #include <os/log.h> #include <DriverKit/DriverKit.h> #include "USBDriver.h" bool USBDriver::init() { if (!super::init()) return false; os_log(OS_LOG_DEFAULT, "terminal.driver: init()"); return true; } kern_return_t IMPL(USBDriver, Start) { os_log(OS_LOG_DEFAULT, "terminal.driver: Start()"); kern_return_t ret = super::Start(provider); if (ret != kIOReturnSuccess) { os_log(OS_LOG_DEFAULT, "terminal.driver: super::Start failed: 0x%08x", ret); return ret; } os_log(OS_LOG_DEFAULT, "terminal.driver: Start() success"); return super::Start(provider); } kern_return_t IMPL(USBDriver, Stop) { os_log(OS_LOG_DEFAULT, "terminal.driver: Stop()"); return super::Stop(provider); } void USBDriver::free() { os_log(OS_LOG_DEFAULT, "terminal.driver: free()"); super::free(); }
2
0
236
3w
Custom menu for Document based app
In my document-based app for macOS I am using storyboard. I create a custom menu and menu items in storyboard. The menu is there, but the menu item remains inactive (grey). In order to activate the menu, one has to use NSWindowDelegate and walk the menu tree, to enable the menu items. import Foundation import Cocoa class DocumentController: NSViewController, NSTextFieldDelegate { @IBOutlet var myOutlet: NSView! // ... code here ... } extension DocumentController: NSWindowDelegate { func windowDidBecomeMain(_ notification: Notification) { NSLog("windowDidBecomeMain - enable menu") if let customMenu = NSApp.mainMenu?.items[2].submenu { customMenu.item(at: 1)?.isEnabled = true } } func windowDidResignMain(_ notification: Notification) { NSLog("windowDidResignMain - disable menu") } } I added the outlet (myOutlet) in storyboard, but windowDidBecomeMain() does not get called? Thanks for any help.
Topic: UI Frameworks SubTopic: General Tags:
0
0
359
Jul ’24
Xcode hangs with iig
Xcode iig hangs. In the best case, the project will be in error - and Xcode cannot recover. To recover restarting Xcode may not help (force quit Xcode) - most of the time a restart of the Mac is required. Its speaks to software quality when "Clean build folder" is your best friend. Xcode iig hangs, and while its only using two of my MacStudio's 10 cores - the whole mac hangs (Activity monitor confirms, if it opens at all). If you are not quick enough to reboot the Mac will hang and require power down using power button. Don't use Finder to reboot because Finder hangs too and will not reboot - use terminal (sudo shutdown -r now). see screen dump below: super useful! After restart, Xode may refuse to launch. This is something I notice with my Java apps (jar launcher): If the app ends with an exit code (1, not 0 like normally) - it will not launch until I restart the Mac, in the meantime must launch the app from Eclipse. After restart, the crash reporter comes up - asking me to type a reason. When I type "iig" the auto-correct will change that to "big". This is so totally useful! MacOS 26.4.1 Xcode 26.3 apologies - its a lousy day when your Mac hangs and requires a restart - repeatedly; until I got my iig fixed up and Xcode fully aware with the actual content. iig error reporting is lousy; which makes fixing so extra hard.
Replies
0
Boosts
0
Views
27
Activity
1d
Driverkit driver hangs on macOS
Hello, I have crated a DriverKit driver for macOS and iPad M-series if I ever get the mac driver working. I have the correct entittlements, and matching provisioning profile downloaded manually. The driver loads (no errors!), and is visible in ioreg below the usb device (when plugged). The issue is that I never get any log from the driver, have reduced to minimal working code (below). When I debug with lldb, I load the symbols for my driver and break on init and Start - but lldb never triggers == never calls start or init. This is also why no logs. When I unplug the device, the driver process (ps aux) keeps running, causes a hard crash of the Mac with dext remove/or kill driver.dext process. I have asked Claude - but its just running in circles: check Info.plist=ok, check entitlements=ok, check code (minimal)=ok, check iig=ok, check provisioning profile=ok, check build settings=ok, check ioreg=ok, check code signature=ok, start over I don't get any log from my driver, which is consistent with init() not being called. All logs from kernel & friends (AMFI) do show the driver loading - no errors. Any tips appreciated! // USBDriver.iig #ifndef USBDriver_h #define USBDriver_h #include <USBDriverKit/IOUSBHostInterface.iig> class USBDriver: public IOService { public: virtual bool init() override; virtual void free() override; virtual kern_return_t Start(IOService * provider) override; virtual kern_return_t Stop(IOService * provider) override; }; // USBDriver.cpp #include <os/log.h> #include <DriverKit/DriverKit.h> #include "USBDriver.h" bool USBDriver::init() { if (!super::init()) return false; os_log(OS_LOG_DEFAULT, "terminal.driver: init()"); return true; } kern_return_t IMPL(USBDriver, Start) { os_log(OS_LOG_DEFAULT, "terminal.driver: Start()"); kern_return_t ret = super::Start(provider); if (ret != kIOReturnSuccess) { os_log(OS_LOG_DEFAULT, "terminal.driver: super::Start failed: 0x%08x", ret); return ret; } os_log(OS_LOG_DEFAULT, "terminal.driver: Start() success"); return super::Start(provider); } kern_return_t IMPL(USBDriver, Stop) { os_log(OS_LOG_DEFAULT, "terminal.driver: Stop()"); return super::Stop(provider); } void USBDriver::free() { os_log(OS_LOG_DEFAULT, "terminal.driver: free()"); super::free(); }
Replies
2
Boosts
0
Views
236
Activity
3w
Custom menu for Document based app
In my document-based app for macOS I am using storyboard. I create a custom menu and menu items in storyboard. The menu is there, but the menu item remains inactive (grey). In order to activate the menu, one has to use NSWindowDelegate and walk the menu tree, to enable the menu items. import Foundation import Cocoa class DocumentController: NSViewController, NSTextFieldDelegate { @IBOutlet var myOutlet: NSView! // ... code here ... } extension DocumentController: NSWindowDelegate { func windowDidBecomeMain(_ notification: Notification) { NSLog("windowDidBecomeMain - enable menu") if let customMenu = NSApp.mainMenu?.items[2].submenu { customMenu.item(at: 1)?.isEnabled = true } } func windowDidResignMain(_ notification: Notification) { NSLog("windowDidResignMain - disable menu") } } I added the outlet (myOutlet) in storyboard, but windowDidBecomeMain() does not get called? Thanks for any help.
Topic: UI Frameworks SubTopic: General Tags:
Replies
0
Boosts
0
Views
359
Activity
Jul ’24