Post

Replies

Boosts

Views

Activity

Apple API for user-space filesystems?
I recently learnt that Apple is encouraging developers to favour user-space drivers, as opposed to kernel extensions, after reading an online article and this made me wonder what this meant for filesystems? Currently there are two solutions here: kernel extensions user-space filesystem via MacFusion What about going forward, I haven't been able to find anything that would cover this? Given MacFuse, and then MacFusion, have suffered, and still suffer, the single developer risk position, it would be good to see something official from Apple, if there isn't already something. The only thing I have been able to see is 'NSFileProviderReplicatedExtension', but this is only really suitable for things like DropBox and GoogleDrive, rather anything like ext4, sshfs or WebDAV. Can one indicate if Apple does have a user-space solution for FS access?
2
0
1.4k
Jan ’22
Error 2003332927 when accessing AVCaptureDevice?
Can anyone tell me what error 2003332927 means? I am getting this when trying to connect to my UVC based slide scanner, but I can't find any good indicating what the code means and what the suggested resolution method is? BTW it has worked on previous occasions. A sample of the code in question:      let device: AVCaptureDevice = self.devices[defaultDevice];           if (captureSession != nil) {       /* if we are "restarting" a session but the device is the same exit early */       let currentDevice = (self.captureSession.inputs[0] as! AVCaptureDeviceInput).device       guard currentDevice != device else { return }               captureSession.stopRunning();     }     captureSession = AVCaptureSession();           do { 			 self.input = try AVCaptureDeviceInput(device: device);        self.captureLayer = AVCaptureVideoPreviewLayer(session: self.captureSession);       self.captureSession.addInput(input);       self.captureSession.startRunning();       self.captureLayer = AVCaptureVideoPreviewLayer(session: self.captureSession); 			 // other code here 	 } catch { 			// catch logic here 	 } The following line is where we first see the error logged in the console: self.captureLayer = AVCaptureVideoPreviewLayer(session: self.captureSession); I am trying to work out if there is an initialisation or parameter missing? Or maybe the issue is closer to the device, but I still need to know the significance of the error to better communicate to the user how to deal with this. BTW checking the status of the device: NSLog(String(device.isSuspended)); // result: false NSLog(String(device.isInUseByAnotherApplication)); // result: false NSLog(String(device.isConnected)); // result: true Project Context: https://github.com/simonguest/quick-camera
4
0
3.1k
Jan ’21
How to show file type drop-down for for NSSavePanel?
I am wanting to show a drop-down for the file types that the user can use during save, but I am not sure how. Below is an extract of the Swift code I am using to display the save dialogue: let panel = NSSavePanel() panel.allowedFileTypes = ["jpg", "jpeg", "png"]; panel.nameFieldStringValue = String(format: "Image %@ at %@.jpg", date, time); panel.beginSheetModal(for: self.window) { (result) in 	if (result == NSApplication.ModalResponse.OK) {   	// Handle file save here 	} }
1
0
450
Jan ’21