Thanks. "sudo killall coreaudiod" worked without permission error on my M1 Sonoma 14.4.1.
I am not sure why kickstart is prevented and killall is allowed.
Post
Replies
Boosts
Views
Activity
I provide macOS application and installer with core audio plugin driver.
If installer cannot restart coreaudiod, installer ask user to reboot macOS. That is big change on my application.
In some condition, like kill app pocess during OSSystemExtensionManager.shared.submitRequest(), CameraExtension go into unstable condition.
Normal uninstall is not possible.
I need to do
Reboot MacBook with recovery mode
run "csrutil disatble"
Reboot
run "systemextensionsctl uninstall [teamID] [BundleID]"
Reboot with recovery mode
run "csrutil enable"
Reboot
I made sure my camera extension is installed and activated
With command "systemextensionsctl list" and my camera extension is listed with "[activated enabled]"
Host app calls API OSSystemExtensionManager.shared.submitRequest with OSSystemExtensionRequest.propertiesRequest.
OSSystemExtensionRequestDelegate.foundProperties is called with my extension's bundle ID.
I delete hosting app by "Finder" -> "/Applications/MyApp.app" -> "Move to Trash".
But "systemextensionsctl list" still says "[Activated and Enabled]" on MyApp's CameraExtension.
I tested with "sudo rm -rf /Applications/MyApp.app". Same result, MyApp's CameraExtensions is still activated and enabled.
Currently I need to implement these tasks.
Uninstaller calls the hosting app with "uninst" argument.
Hosting App with "uninst", open app with blank view. Deactivate the extension and quit
Uninstaller delete other items like /Library/Audio/Plug-Ins/HAL/MyAudio.driver
Uninstaller delete /Applications/MyApp.app
you don't really need an uninstaller - everything goes away when the user deletes the app.
My app installed CameraExtension and audio driver under /Library/Audio/Plug-Ins/HAL/MyAudio.driver
After user delete my app under /Applications, the driver files under /Library/Audio/Plug-Ins/HAL/MyAudio.driver still exists.
I need to provide uninstaller for deleting audio driver.
OS will take care of unloading the extension
I found OS only take care of unloading camera extension. OS does not take care Audio Extension.
com.my.app.unisntaller is typo. Correct ID is com.my.app.uninstaller.
I like to know which Bundle ID can deactivate "com.my.app.cameraex".
"com.my.app" only or "com.my.app.[anyID]"
Process.run() is not allowed on CMIO Camera Extension. That should be listed on Xcode, "Signing & Capabilities"
I use TCP server with unprivileged Ports (1024-65535). TCP socket listening is allowed for the extension.
I need to enable permission on Xcode, Sandbox "Signing & Capabilities"
I found a way.
Install Camera Extension by OSSystemExtensionManager.shared.submitRequest and OSSystemExtensionRequest.activationRequest
Start FaceTime or Quick Camera app, select your camera extension as video source.
Check PID of your Camera extension by ps -ae | grep com.example.YourCameraExtension
Run command log show --predicate 'processID == [PID]' --info
You can see NSLog output from your Camera Extension
If someone has easier way, please let me know.
I found non UI thread calling NSWindow.performMiniaturize().
I put dispatch_async(dispatch_get_main_queue(), ^{}) around UI method.
Thanks
I have two crash reports. I renamed company name to "Example".
cr0.txt
cr1.txt
I pass setting by encoderSpec dictionary wrong way with value:false. I need to use kCFBooleanFalse.
Better way is calling VTSessionSetProperty and check status.
status = VTSessionSetProperty(vtCompressionSession, key: kVTCompressionPropertyKey_AllowFrameReordering, value: kCFBooleanFalse)
Presentation time stamp order on encode() : 0 1 2 3 4 5
DidCompress callback order : 1 0 3 2 5 4
On Settings -> Privacy & Security -> Screen Recording, delete the application's line by "-" button and recreate line.
I need to delete the application's line by "-" button and recreate line on Settings -> Privacy & Security -> Screen Recording.
Just enabling is not works.
That allocations up counter in "# Transient" column.
Explanation of "# Transient" is
The # Transient column shows the number of objects that existed but have since been deallocated. Persistent objects are using up memory; transient objects are not.
I can ignore this allocation since it is deallocated.