Hello all!
My application written with C++ for iOS. Want to make some functionality in static library for the purpose of reuse it in different C++ projects. Want to make universal library for using StoreKit2. Global idea is to wrap StoreKit2 Swift out with CPP interoperability.
Now trying to make clear for my self how to create C++ static library with Swift interoperability for iOS in XCode. There are only Objective-C option when you creating static library in XCode for iOS. Is it correct:
- Create Static Library with Objective-C in XCode
- Remove all default Objective-C files
- Add C++ files
- Add C++/Swift interoperability in build settings
- Add swift classes
Beside all of it some questions:
- When C++ static library contain Swift code with interoperability will it require some special settings for project (Swift standard lib or some other settings)? Or it could be used like any other C++ libraries?
- What is the optimal build settings in this case to reduce dependencies when using it different projects?
- Is there any examples of the same approach for iOS development?