Open agsh opened 5 years ago
Can you share the working Objective-C version?
Thank for the answer! Sure, I used this example (at that time this project was totally written in Objective-C): https://github.com/klep/scanline/blob/1a65ab3e19c25ea8610b8e445cfce973a2940e7b/scanline/AppController.m#L88 The output is:
Mac-mini-user:Products user$ ./Debug/scanline -list
2019-02-28 16:58:59:688 scanline[696:307] Available scanners:
2019-02-28 16:58:59:690 scanline[696:307] * HP LaserJet Pro MFP M225dw (A87D7F)
I tried to reproduce the issue, but since I don't have any scanners I can't even get the code you linked to get working as expected.
Does this work for you? (basically the objc equivalent of your code)
I'll try it tomorrow. Appreciate a lot for your help!
Yes, I got
browser: <ICDeviceBrowser: 0x100688d80>
-[LKICDeviceBrowserDelegate deviceBrowser:didAddDevice:moreComing:]
in console
Hi! I'm trying to find all scan devices using ImageCaptureCore, but the code below doesn't call the delegate's methods. And the similar Objective-C code does. Maybe I'm wrong somewhere because header file(https://github.com/phracker/MacOSX-SDKs/blob/master/MacOSX10.7.sdk/System/Library/Frameworks/ImageCaptureCore.framework/Versions/A/Headers/ICDeviceBrowser.h) is slight different from your example with NSFileManager