I found the method once before in the Apple Developer docs so I know it exists.
Searching for it now online bears no fruit.
Super grateful for any leads on this.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
From the imagecapturecore-rs crate here:
https://github.com/brandonhamilton/image-capture-core-rs/issues/7
Only didOpenSessionWithError fires when connecting a PTP (picture transfer protocol) device with a None for the error value and an NSArray with a count of 0.
decl.add_method(
sel!(device:didOpenSessionWithError:),
device_did_open_session_with_error as extern "C" fn(&Object, Sel, id, id),
);
println!(" 📸 add_method didCloseSessionWithError");
decl.add_method(
sel!(device:didCloseSessionWithError:),
device_did_close_session_with_error as extern "C" fn(&Object, Sel, id, id),
);
println!(" 📸 add_method didRemoveDevice");
decl.add_method(
sel!(didRemoveDevice:),
device_did_remove_device as extern "C" fn(&Object, Sel, id),
);
println!(" 📸 add_method withCompleteContentCatalog");
decl.add_method(
sel!(withCompleteContentCatalog:),
device_did_become_ready as extern "C" fn(&Object, Sel, id),
);
Do I need to be using the fancier cameraDevice.requestOpenSession() with the callback function from here?
https://developer.apple.com/documentation/imagecapturecore/icdevice/3142916-requestopensession
As seen on StackOverflow:
https://stackoverflow.com/questions/68978185/apple-ptp-withcompletecontentcatalog-not-firing-rust-obj-c