-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
A-frameworkAffects the framework crates and the translator for themAffects the framework crates and the translator for themdocumentationImprovements or additions to documentationImprovements or additions to documentation
Milestone
Description
I'm trying to migrate to objc2, coming from kornelski/rust-security-framework.
I was able to use the Objc2's local authentication framework in my codebase and it's working great, thanks!
However in case of security framework, I'm running into some type check errors that I'm not able to make sense of, would be really nice if I can get some pointers.
let query = CFMutableDictionary::new(
kCFAllocatorDefault,
1,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks,
)
.unwrap();
// Error on `add`: the trait bound `objc2_core_foundation::opaque::Opaque: objc2_core_foundation::Type` is not satisfied
query.add(kSecClass, kSecClassGenericPassword);
query.add(kSecMatchLimit, kSecMatchLimit);
query.add(kSecReturnData, kCFBooleanTrue);
let mut out: MaybeUninit<*const CFType> = MaybeUninit::uninit(); // Not sure if this is even correct
let result = SecItemCopyMatching(&query, out.as_mut_ptr());Also would you be open for contributions into the examples of this repo?
Metadata
Metadata
Assignees
Labels
A-frameworkAffects the framework crates and the translator for themAffects the framework crates and the translator for themdocumentationImprovements or additions to documentationImprovements or additions to documentation