I've been cracking my head the past few days trying to solve this but I have absolutely no clue. I've created a static library in Swift and it requires an Objective-C framework to perform certain features. The static lib builds fine until I used it in a testing Swift Project.
The Objective-C framework is giving errors:
I am in desperate need of help, or some sort of understanding. I'm a bit slow in this; thank you for your assistance in advance.
The Swift static library:
As you can see, the framework has been imported inside. Static library target settings:
- Linking -> Other Linker Flags: -ObjC
- Linking -> Runpath Search Paths: $(inherited), @executable_path/Frameworks, @loader_path/Frameworks
- Search Paths -> Framework Search Paths: $(inherited), $(PROJECT_DIR)/TestSDK
- Search Paths -> Header Search Paths: nothing
- Search Paths -> Library Search Paths: nothing
- Swift Compiler - Search Paths -> Import Paths: nothing
The test Swift project that's hosting the static library:
- Linking -> Other Linker Flags: -ObjC
- Linking -> Runpath Search Paths: $(inherited), @executable_path/Frameworks, @loader_path/Frameworks
- Search Paths -> Framework Search Paths: $(inherited), $(PROJECT_DIR)
- Search Paths -> Header Search Paths: nothing
- Search Paths -> Library Search Paths: $(inherited), $(PROJECT_DIR)
- Swift Compiler - Search Paths -> Import Paths: $(PROJECT_DIR)
I have a hard time trying to understand the theory behind this. I hope I can finally solve & understand how it works after this. Even the smallest help will be very much appreciated!!