wheresmycookie wheresmycookie - 1 year ago 119
iOS Question

Created new XCode Configuration and Scheme - linker is suddenly failing

A new XCode project has Debug and Release Configurations. I've added a new one under "ProjectName > Info" called "development", which is for now a duplicate of "debug".

I wanted to create a new scheme for building the app in development mode, so I duplicated the "Projectname" scheme and named it "DevelopmentScheme".

I set the build configuration for "run" and "archive" to the new "development" configuration that I created.

I'm still able to build the original Scheme.

I'm also able to build all of the required libraries when the project is configured with the development scheme, but when I get to the linking phase, I get the error:

ld: library not found for -lRNCookieManagerIOS
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Being relatively new to iOS development, I'm not really sure what the issue could be. Since I duplicated everything, shouldn't that mean they behave in the same way? Thoughts on what might be different between the original and new schemes?

Answer Source

The problem is that Xcode will expect to find the libraries inside a folder named after your custom configuration. You can add the custom configuration to each library you use, or better follow the steps below to make it use the libraries built via the Release configuration.


  • Select your target
  • Open Build Settings tab
  • Search for 'Library Search Paths'
  • You'll see your new configuration name alongside Debug and Release
  • Double-click the space next to your new configuration name
  • Set recursive to true.

enter image description here

  • Exit the dialog and you should see:

enter image description here

(inspired by this post)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download