I'm working to wrap a C++ libary so it can be called from ObjC/Swift. I managed to find some useful tidbits in the doc for the GCC flag `-fobjc-call-cxx-cdtors`. And then I also was able to track down some older stuff in the Internet Archive: http://web.archive.org/web/20101203170217/http://developer.apple.com/library/mac/#/web/20101204020949/http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocCPlusPlus.html
But other than that, there doesn't seem to be a lot of doc out there. Hopefully that's a good sign and "things just work" as I'd expect... but I'd like to refer to "current documentation" to help make sure I'm not forgetting any potential gotchas, etc. Is there a current version of the guide for ObjC/C++ interop anywhere? I was hoping for something similar to the excellent guide for working with C/ObjC from Swift.
Any help is appreciated... thanks!
I don’t do C++ so I don’t have a lot of insight to share here. However, I thought I’d address this point:
That older doc I found in the internet archive is helpful... but it pre-dates the releases of ARC, C++ 11, and C++ 14.
The standard go-to document for ARC, Objective-C Automatic Reference Counting, does cover C++ issues. I’m not sure if it’s sufficient for your needs, but it’s worth looking at.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"