cateof
cateof

Reputation: 6758

Problems when adding an external framework in iOS

I want to add the PLCrashFramework in my app. This frameworks deals with crash reporting for iOS/MAC applications. What I did

  1. Downloaded and unzipped the .zip file from the URL I have already provided.
  2. In Xcode "Build Phases" -> Link Binary With Libraries
  3. From the pop up "Choose frameworks and libraries to add"
  4. Select "Add Other"... and select "CrashReporter.framework" and Open

After those steps I successfully built the project without problems.

I closed the Xcode, opened it again and tried to build. The build failed with "header file not found", referring to a header file that belongs to the framework.

Why the xcode 6 does not find the header after closing and reopening the project?

Upvotes: 2

Views: 2228

Answers (2)

Shoaib
Shoaib

Reputation: 21

You should add the framework though add file in project navigator by right click and select add file in your project and than browse to framework location and add framework. Remember to check copy file in your project it is must do. In this way Xcode will manage library header search path. You can see the framework will be added in Xcode "Build Phases" -> Link Binary With Libraries. If it is somehow not there you can add it by dragging framework from project navigator. The error will be gone.

Upvotes: 0

vrwim
vrwim

Reputation: 14260

Check your Framework Search Paths and Library Search Paths in your project's Build Settings. Check if you have a space in your directory structure. It's probably looking for 2 folders, one with the first part of the folder structure and one with the second. To fix this, simply add quotes around the whole folder structure.

Upvotes: 2

Related Questions