I have a cross-platform Swift/C++ project in which I'm using UserDefaults to store settings values. Is it possible to export this type (or any Foundation type, Bundle would also be of interest) to C++, so I can use the type directly to get values in the C++ part instead of having proxy functions/class in my code that just call the respective UserDefaults methods, or at least pass the type around?
I've already tried generating a C++ header for the entire Foundation module by itself but that crashed swiftc. (:
@_exported import class Foundation.UserDefaults
also doesn't export the type in my generated header.