The newly created Xcode configuration and linker suddenly stop working

The new Xcode project has Debug and Release settings. I added a new one in "ProjectName> Info" called "development", which currently duplicates "debug".

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

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

I can still create the original circuit.

I can also build all the necessary libraries when the project is configured using the development scheme, but when I get to the linking phase, I get an error message:

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 quite sure what the problem is. Since I duplicated everything, does this not mean that they behave the same? Thoughts on what may differ from the original and the new scheme?

+5
source share
2 answers

The problem is that Xcode expects to find the libraries inside the folder with the name after your custom configuration. You can add a custom configuration to each library you use, or better follow the steps below to use libraries created using the Release configuration.

Steps:

  • Choose a target
  • Open the Build Settings tab
  • Search Library Search Paths
  • You will see a new configuration name along with Debug and Release
  • Double-click the space next to the new configuration name
  • Enter "$(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)"
  • Set the recursive value to true.

enter image description here

  • Exit the dialog box and you will see the following:

enter image description here

( inspired by this post )

+18
source

Xcode 8.3.2 requires slightly different changes.

For it to work, you need to modify the Per-configuration Build Products Path for your custom build configuration. For example, I have config Internal build. In this field, instead of $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) I put $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME) , and now it works :).

+5
source

All Articles