Post

Replies

Boosts

Views

Activity

Reply to Basic c++xcodeproj call to swift code
I not see how to update my prevue comment. so I fix it. keep swift code in different target(framework type) set swift target build settings: SWIFT_INSTALL_OBJC_HEADER to yes. C++ and Objective-C Interoperability to C++ / Objective-C++ add swift target as Embed in c++ target(this automatically add it to be linked) include -Swift.h where you need to use. and use it. set c++ target :: build settings:: HEADER_SEARCH_PATHS to $(BUILT_PRODUCTS_DIR)/.framework/Headers abut part 5, I sure someone can give better path or way, but this work.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’25
Reply to Basic c++xcodeproj call to swift code
I not see how to update my prevue comment. so I fix it. keep swift code in different target(framework type) set swift target build settings: 2.1. SWIFT_INSTALL_OBJC_HEADER to yes. 2.2. C++ and Objective-C Interoperability to C++ / Objective-C++ 3. add swift target as Embed in c++ target(this automatically add it to be linked) 4. include -Swift.h where you need to use. and use it. 5. set c++ target :: build settings:: HEADER_SEARCH_PATHS to $(BUILT_PRODUCTS_DIR)/.framework/Headers abut part 5, I sure someone can give better path or way, but this work.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’25
Reply to Basic c++xcodeproj call to swift code
keep swift code in different target(framework type) set swift target build settings: 2.1. SWIFT_INSTALL_OBJC_HEADER to yes. 2.2. C++ and Objective-C Interoperability to C++ / Objective-C++ add swift target as Embed in c++ target include -Swift.h where you need to use. and use it. set c++ target :: build settings:: HEADER_SEARCH_PATHS to $(BUILT_PRODUCTS_DIR)/.framework/Headers
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’25