0

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:

enter image description here

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:

enter image description here enter image description here

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:

enter image description here

  • 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!!

Shanice C.
  • 53
  • 2
  • 10
  • Is the framework built for x86_64? Also, see suggestions at https://stackoverflow.com/questions/49767974/auto-linking-framework-not-found – Phillip Mills Oct 20 '20 at 14:14
  • Check the static framework xcode project `Build Active Architecture only` setting. https://medium.com/macoclock/deep-drive-xcode-build-settings-827c3ce4811c – Kamil.S Oct 20 '20 at 19:02

0 Answers0