Post

Replies

Boosts

Views

Activity

Making DataScannerViewController work in the Simulator
Before you post —Camera doesn't work on the Simulator— that's no longer true. I've made a solution that makes the Simulator believe there's an actual hardware device connected, allowing users to stream the macOS camera to the iOS Simulator (see for more info RocketSim's documentation: https://docs.rocketsim.app/features/hzQMSrSga7BGWvxdNVdwYs/simulator-camera-support/58tQ5jvevLNSnyUEA7VgAv) Now, it works for VNDocumentCameraViewController, but when I try opening DataScannerViewController, I directly run into: Failed to start scanning: The operation couldn’t be completed. (VisionKit.DataScannerViewController.ScanningUnavailable error 0.) My question: How does this view controller determine whether scanning is available? Is there a certain capability the available AVCaptureDevice's need to support maybe? Any direction would be helpful for me to make this work for developers, making them build apps faster!
0
1
359
Jul ’25
NWPathMonitor mocking for Simulator using Network Extension
Is it possible to mock the behavior of NWPathMonitor for a specific app? The scenario I want to support I've created an app called RocketSim, a developer tool for Xcode's Simulator. I've already created Airplane mode, which disables networking calls from URLSession from a specific bundle identifier app installed on the Simulator. Now, I want to support blocking NWPathMonitor as well. I believe the Simulator uses macOS's NWPathMonitor and does not use any specific HTTP request or similar to determine the reachability state. Is there a way I can make NWPathMonitor return unsatisfied when my 'airplane mode' is turned on? Potentially using a Network Extension?
1
0
857
Apr ’24
Network Extension Development Flow
I've been following these instructions and managed to get a development flow running: https://developer.apple.com/forums/thread/725805 However, my extension changes are only applied as follows: Change the code Remove the extension using OSSystemExtensionRequest.deactivationRequest Restart Mac If I don't do that, it seems that the old version of my extension keeps running. I confirmed this based on OSLogs that I added. In other words: how can I ensure during development my latest code gets executed?
2
0
596
Apr ’23
Network Extension receives stop command right after start
Right after starting my Network Extension I see logs about it being stopped. This is unexpected, since I don't request a stop myself. See: Logs Secondly: I'm trying to build a Network Provider to stop any requests coming from a specific app. Am I correct I can do that using the NEFilterDataProvider without any filters configured? override func startFilter(completionHandler: @escaping (Error?) -> Void) { log.log(level: .debug, "startFilter NEW3") completionHandler(nil) }
2
0
786
Apr ’23
Network Link Conditioner using a Network Extension
Currently, I've been able to completely block requests using a Content Filter Network extension. Right now, I'm looking to build a Network Link Conditioner that applies to an individual app only. The Network Link Conditioner allows selecting profiles with specific settings: Downlink Packages Dropped Bandwidth Delay Uplink Bandwidth Packets dropped Delay My question Is it possible to reproduce this behavior using a Network Extension and if so, which type of network extension should I use?
2
0
1k
Jun ’24
Understanding PHPickerConfiguration.AssetRepresentationMode.current
The documentation for this API mentions: The system uses the current representation and avoids transcoding, if possible. What are the scenarios in which transcoding takes place? The reason for asking is that we've had a user reaching out saying they selected a video file from their Photos app, which resulted in a decrease in size from ~110MB to 35MB. We find it unlikely it's transcoding-related, but we want to gain more insights into the possible scenarios.
3
1
1.1k
Sep ’23
AVCaptureSession startRunning is slow
AVCaptureSession's startRunning method is thread blocking and seems to be slow. What is this method doing behind the scenes? For context: I'm working on Simulator Camera support and I have a 'fake' AVCaptureDevice that might be causing this. My hypothesis is that AVCaptureSession tries to connect to the device and waits for a notification to be posted back. I'd love to find a way to let my fake device message AVCaptureSession that it's connected.
3
0
301
Jul ’25
Hide OS logs coming out of the Network framework (category: com.apple.network)
I'm establishing a connection with NWListener and NWConnection which is working great. However, if the listener disappears, a lot of logs are appearing: Is there a way to hide these logs? I'm aware of OS_ACTIVITY_MODE=disabled, but that will also hide a lot of other logs. I also know you can hide these using Xcode's filtering. I'm looking for a programmatically way to hide these completely. I'm not interested in seeing these at all, or, at least, I want to be in control. Thanks!
4
0
191
Apr ’25
iPhone Mirroring API
I'm super excited about the announcement of iPhone Mirroring on macOS. Will there be a way to communicate with a connected device throughout an API? E.g., will we developers get a way to write automation or interact with the connected device via code?
7
0
2.1k
Jun ’24
Apple Intelligence Photo picking
IIRC, the new photos highlights videos pick your best photos using Apple Intelligence. Is there an API or metadata available to use AI and get the best photo out of e.g. 5 similar photos?
Replies
0
Boosts
1
Views
789
Activity
Jun ’24
Making DataScannerViewController work in the Simulator
Before you post —Camera doesn't work on the Simulator— that's no longer true. I've made a solution that makes the Simulator believe there's an actual hardware device connected, allowing users to stream the macOS camera to the iOS Simulator (see for more info RocketSim's documentation: https://docs.rocketsim.app/features/hzQMSrSga7BGWvxdNVdwYs/simulator-camera-support/58tQ5jvevLNSnyUEA7VgAv) Now, it works for VNDocumentCameraViewController, but when I try opening DataScannerViewController, I directly run into: Failed to start scanning: The operation couldn’t be completed. (VisionKit.DataScannerViewController.ScanningUnavailable error 0.) My question: How does this view controller determine whether scanning is available? Is there a certain capability the available AVCaptureDevice's need to support maybe? Any direction would be helpful for me to make this work for developers, making them build apps faster!
Replies
0
Boosts
1
Views
359
Activity
Jul ’25
NWPathMonitor mocking for Simulator using Network Extension
Is it possible to mock the behavior of NWPathMonitor for a specific app? The scenario I want to support I've created an app called RocketSim, a developer tool for Xcode's Simulator. I've already created Airplane mode, which disables networking calls from URLSession from a specific bundle identifier app installed on the Simulator. Now, I want to support blocking NWPathMonitor as well. I believe the Simulator uses macOS's NWPathMonitor and does not use any specific HTTP request or similar to determine the reachability state. Is there a way I can make NWPathMonitor return unsatisfied when my 'airplane mode' is turned on? Potentially using a Network Extension?
Replies
1
Boosts
0
Views
857
Activity
Apr ’24
Network Extension Development Flow
I've been following these instructions and managed to get a development flow running: https://developer.apple.com/forums/thread/725805 However, my extension changes are only applied as follows: Change the code Remove the extension using OSSystemExtensionRequest.deactivationRequest Restart Mac If I don't do that, it seems that the old version of my extension keeps running. I confirmed this based on OSLogs that I added. In other words: how can I ensure during development my latest code gets executed?
Replies
2
Boosts
0
Views
596
Activity
Apr ’23
Network Extension receives stop command right after start
Right after starting my Network Extension I see logs about it being stopped. This is unexpected, since I don't request a stop myself. See: Logs Secondly: I'm trying to build a Network Provider to stop any requests coming from a specific app. Am I correct I can do that using the NEFilterDataProvider without any filters configured? override func startFilter(completionHandler: @escaping (Error?) -> Void) { log.log(level: .debug, "startFilter NEW3") completionHandler(nil) }
Replies
2
Boosts
0
Views
786
Activity
Apr ’23
Network Link Conditioner using a Network Extension
Currently, I've been able to completely block requests using a Content Filter Network extension. Right now, I'm looking to build a Network Link Conditioner that applies to an individual app only. The Network Link Conditioner allows selecting profiles with specific settings: Downlink Packages Dropped Bandwidth Delay Uplink Bandwidth Packets dropped Delay My question Is it possible to reproduce this behavior using a Network Extension and if so, which type of network extension should I use?
Replies
2
Boosts
0
Views
1k
Activity
Jun ’24
Unable to determine byte size
I'm having a very annoying issue where I'm unable to debug. Everytime I use po or print on an object I get:`Unable to determine byte size`Any idea how to fix this?
Replies
5
Boosts
0
Views
3.5k
Activity
May ’22
Understanding PHPickerConfiguration.AssetRepresentationMode.current
The documentation for this API mentions: The system uses the current representation and avoids transcoding, if possible. What are the scenarios in which transcoding takes place? The reason for asking is that we've had a user reaching out saying they selected a video file from their Photos app, which resulted in a decrease in size from ~110MB to 35MB. We find it unlikely it's transcoding-related, but we want to gain more insights into the possible scenarios.
Replies
3
Boosts
1
Views
1.1k
Activity
Sep ’23
AVCaptureSession startRunning is slow
AVCaptureSession's startRunning method is thread blocking and seems to be slow. What is this method doing behind the scenes? For context: I'm working on Simulator Camera support and I have a 'fake' AVCaptureDevice that might be causing this. My hypothesis is that AVCaptureSession tries to connect to the device and waits for a notification to be posted back. I'd love to find a way to let my fake device message AVCaptureSession that it's connected.
Replies
3
Boosts
0
Views
301
Activity
Jul ’25
Hide OS logs coming out of the Network framework (category: com.apple.network)
I'm establishing a connection with NWListener and NWConnection which is working great. However, if the listener disappears, a lot of logs are appearing: Is there a way to hide these logs? I'm aware of OS_ACTIVITY_MODE=disabled, but that will also hide a lot of other logs. I also know you can hide these using Xcode's filtering. I'm looking for a programmatically way to hide these completely. I'm not interested in seeing these at all, or, at least, I want to be in control. Thanks!
Replies
4
Boosts
0
Views
191
Activity
Apr ’25
iPhone Mirroring API
I'm super excited about the announcement of iPhone Mirroring on macOS. Will there be a way to communicate with a connected device throughout an API? E.g., will we developers get a way to write automation or interact with the connected device via code?
Replies
7
Boosts
0
Views
2.1k
Activity
Jun ’24