Post

Replies

Boosts

Views

Activity

Reply to Detect SD Card
This is as far as I have got with ImageCaptureCore - attempting the simplest possible case to detect the card - running on an iPhone from Xcode it crashes. I have also tried with the ICDeviceBrowserDelegate directly on the DeviceProbe class but get the same result. import Foundation import ImageCaptureCore @objcMembers final class CameraBrowserDelegate: NSObject, ICDeviceBrowserDelegate { func deviceBrowser(_ browser: ICDeviceBrowser, didAdd device: ICDevice, moreComing: Bool) { print("Did add device: \(device)") } func deviceBrowser(_ browser: ICDeviceBrowser, didRemove device: ICDevice, moreGoing: Bool) { print("Did remove device: \(device)") } } final class DeviceProbe: NSObject { private let browser = ICDeviceBrowser() private let delegate = CameraBrowserDelegate() override init() { super.init() browser.delegate = delegate browser.browsedDeviceTypeMask = ICDeviceTypeMask( rawValue: ICDeviceTypeMask.camera.rawValue )! print("Starting device browser...") browser.start() // <-- crash occurs here } }
Topic: App & System Services SubTopic: Core OS Tags:
May ’26
Reply to Detect SD Card
Thanks very much for the response. Yes I considered using the ImageCapture framework but it seems to be designed for communicating with cameras and scanners rather than SD card readers. Is this incorrect? Does the Photos app use the ImageCapture framework for importing images from USB attached SD cards?
Topic: App & System Services SubTopic: Core OS Tags:
May ’26
Reply to Cross process URL bookmark
Before I get too far into inter process communication I've been testing the concept of passing file descriptors using XPC by using an XPC Service (this should allow me to debug the XPC communication syntax). Is it sufficient to pass a FileHandle? Passing a FileHandle is straightforward and works well with the XPC Service but would it work across processes or do I need to find some way of passing a raw file descriptor? Passing raw file descriptors seems much more complex - especially in a pure Swift application. I tried passing UnsafeMutablePointer but that failed and crashed the application.
Jun ’25
Reply to Cross process URL bookmark
Thanks a lot - I will give this a try - it is not a problem for all the clients to share the same app group and be published by the same team. I have done something similar using an XPC service with a single client but that seems much more straightforward to implement. Generating the named XPC endpoint from a Swift app appears more complicated and tutorials/examples hard to find. ChatGPT points me to using launchctl from the command line to register a MachServices name but this would make it complicated to distribute the application.
May ’25
Reply to Detect SD Card
Its a shame its so slow. It overcomes many of the drawbacks of using native SwiftUI functionality but its orders of magnitude slower.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to Detect SD Card
Yes - it was my lack of familiarity with the communication between a SwiftUI application and this type of framework.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to Detect SD Card
I now have everything working - thanks for your help - I'll Accept your first response. Thanks again for your patience.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to Detect SD Card
This is as far as I have got with ImageCaptureCore - attempting the simplest possible case to detect the card - running on an iPhone from Xcode it crashes. I have also tried with the ICDeviceBrowserDelegate directly on the DeviceProbe class but get the same result. import Foundation import ImageCaptureCore @objcMembers final class CameraBrowserDelegate: NSObject, ICDeviceBrowserDelegate { func deviceBrowser(_ browser: ICDeviceBrowser, didAdd device: ICDevice, moreComing: Bool) { print("Did add device: \(device)") } func deviceBrowser(_ browser: ICDeviceBrowser, didRemove device: ICDevice, moreGoing: Bool) { print("Did remove device: \(device)") } } final class DeviceProbe: NSObject { private let browser = ICDeviceBrowser() private let delegate = CameraBrowserDelegate() override init() { super.init() browser.delegate = delegate browser.browsedDeviceTypeMask = ICDeviceTypeMask( rawValue: ICDeviceTypeMask.camera.rawValue )! print("Starting device browser...") browser.start() // <-- crash occurs here } }
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to Detect SD Card
Thanks - are you aware of any sample Swift code that could help me in accessing the card reader? The documentation is more geared towards camera access.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to Detect SD Card
Thanks very much for the response. Yes I considered using the ImageCapture framework but it seems to be designed for communicating with cameras and scanners rather than SD card readers. Is this incorrect? Does the Photos app use the ImageCapture framework for importing images from USB attached SD cards?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’26
Reply to Cross process URL bookmark
Before I get too far into inter process communication I've been testing the concept of passing file descriptors using XPC by using an XPC Service (this should allow me to debug the XPC communication syntax). Is it sufficient to pass a FileHandle? Passing a FileHandle is straightforward and works well with the XPC Service but would it work across processes or do I need to find some way of passing a raw file descriptor? Passing raw file descriptors seems much more complex - especially in a pure Swift application. I tried passing UnsafeMutablePointer but that failed and crashed the application.
Replies
Boosts
Views
Activity
Jun ’25
Reply to Cross process URL bookmark
Thanks again - plenty to think about here
Replies
Boosts
Views
Activity
Jun ’25
Reply to Cross process URL bookmark
Thanks a lot - I will give this a try - it is not a problem for all the clients to share the same app group and be published by the same team. I have done something similar using an XPC service with a single client but that seems much more straightforward to implement. Generating the named XPC endpoint from a Swift app appears more complicated and tutorials/examples hard to find. ChatGPT points me to using launchctl from the command line to register a MachServices name but this would make it complicated to distribute the application.
Replies
Boosts
Views
Activity
May ’25
Reply to Cross process URL bookmark
The current method of launching the server process: try SMAppService.loginItem(identifier: "abcd").register() I am open to any suggestions.
Replies
Boosts
Views
Activity
May ’25
Reply to Cross process URL bookmark
The background process only needs access to the files while the metadata are extracted - nothing needs to persist. If the client wanted more or different metadata - even from the same image file - it would be acceptable to run the procedure again.
Replies
Boosts
Views
Activity
May ’25
Reply to Unable to setup M4 iPad Pro for development using Xcode 15.4 (15F31d) and iOS 17.5 (21F84)
Working OK now (without any further changes at my end)
Replies
Boosts
Views
Activity
May ’24
Reply to Unable to setup M4 iPad Pro for development using Xcode 15.4 (15F31d) and iOS 17.5 (21F84)
Same problem - I've gone as far as completely reinstalling Xcode - no change. Google gave a couple of suggestions where this message has shown up in the past - but they did no good either.
Replies
Boosts
Views
Activity
May ’24
Reply to No team found in the archive while - macOS direct distribution
Hmm - it seems that changing Signing Certificate to Development works in my situation
Replies
Boosts
Views
Activity
Nov ’23
Reply to No team found in the archive while - macOS direct distribution
Did you find a solution? I'm getting the same message and I've done this many times for this app in the past.
Replies
Boosts
Views
Activity
Nov ’23