Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Framework Search Paths not finding frameworks outside project directory

In a large monorepo of Cocoapod projects I have the following directory structure.

  • Project
    • Common
      • Foo.Framework
    • First Project
      • Project.Xcode
    • Second Project
      • Project.Xcode

The goal is that there are multiple Cocoapod projects and rather than have the same framework copied in multiple places within the First and Second project, I'd rather have it once in a Common folder in the parent directory, and then drag it into the project and set the framework search paths.

So I'm running into an issue where the linker cannot find the Foo.framework.

What should I set the framework search path to so that it correctly finds the framework.

If I include the framework inside the Project directories it doesn't run into any issues.

like image 341
Rohan Panchal Avatar asked Nov 09 '22 07:11

Rohan Panchal


1 Answers

I had the same issue and solved it like following:

  1. Go to Build Settings
  2. Find the "Framework Search Paths"
  3. Add $(PROJECT_DIR)/../your_directory
  4. Use the recursive flag if the framework file isn't in the exact directory you selected)
like image 165
Henning Hall Avatar answered Dec 31 '22 05:12

Henning Hall