Post

Replies

Boosts

Views

Activity

Reply to Access of removable volumes from file provider on macOS Sequoia
Hello, The "Removable Volume access request" is actually triggered by a start() call to ICDeviceBrowser (this class can scan for cameras and scanners connected to the computer) The flow is like this: I. In the main app discovers the connected scanners or cameras like this: let browser: ICDeviceBrowser browser.start() // This will trigger the Removable Volume access request II. I accept the request and devices are discovered and connected. III. After a device is discovered I create a new FileProvider extension for the new connected device. IV. In the FileProvider class I connect to the scanner, but to connect to a scanner I must start again a device browser monitor in order to have a reference to the actual scanner device: let browser: ICDeviceBrowser browser.start() start() will trigger the Removable Volume access request, this time inside the FileProvider. This is where it fails, see above the error message. I don't know why it triggers again the request, the main app is already confirmed. This workflow worked fine until now (before macOS Sequoia). Thank you.
Sep ’24
Reply to Get Process ID (pid) from NEFilterFlow & sourceAppAuditToken
Ohh, found the solution. It's quite easy. Basically you have to convert the "flow.sourceAppAuditToken" to an array of UInt32. This array will have 8 elements. With that array you can init a audit_token_t.let array: [UInt32] = convertToArray(flow.sourceAppAuditToken)let audit_token = audit_token_t(val: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7]))let pid = audit_token_to_pid(token_t)Hope this helps to someone.Regards
Dec ’19
Reply to how to get the pid of NEFilterFlow in handleNewFlow of Network Extension?
Hello,Thank you for these answers, it helped me a lot in my reasearch.For my usecase I need to find out the PID of the process that makes the request. I understand that I can use "audit_token_to_pid". But this function accepts a "audit_token_t" parameter.How can I convert the "flow.sourceAppAuditToken" (which is a Data type) to the required "audit_token_t" type?Any hints?Thank you again
Dec ’19