Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding frameworks to project in Xcode 5 and having *relative* paths added

Tags:

xcode

ios

All of a sudden today I get an unexpected problem with Xcode (5).

This is how I normally add an external framework:

Drag-n-drop the file (xxx.framework etc) (or the folder which contains the file) into the project manager. In "Choose options for adding files" I check "Copy items into destination (if needed)" only if needed (if the files are already in the project's folder I don't do this) In "Folders" I select Create groups for any added folders And I add it to my app target.

Normally this would also add the relative path(s) to the framework in Build Settings/Framework Search Paths and Library Search Paths.

However today the path that shows up there is direct (aka absolute). This breaks stuff down the line because the paths should be relative. How come Xcode does this all of a sudden? I suspect it might have to do with this one project only (it comes from a 3rd part dev) and something about their project setup could be causing this.

like image 826
Jonny Avatar asked Oct 01 '13 06:10

Jonny


People also ask

How do I add frameworks in Xcode?

To include a framework in your Xcode project, choose Project > Add to Project and select the framework directory. Alternatively, you can control-click your project group and choose Add Files > Existing Frameworks from the contextual menu.

How do I add a framework to a swift project?

Select the target for where you want to add frameworks in the project settings editor. 3. Select the “Build Phases” tab, and click the small triangle next to “Link Binary With Libraries” to view all of the frameworks in your application. 4.To Add frameworks, click the “+” below the list of frameworks.

How do you add relative paths?

Relative path Relative paths make use of two special symbols, a dot (.) and a double-dot (..), which translate into the current directory and the parent directory.

How do you use absolute and relative paths?

An absolute path is defined as specifying the location of a file or directory from the root directory(/). In other words,we can say that an absolute path is a complete path from start of actual file system from / directory. Relative path is defined as the path related to the present working directly(pwd).


1 Answers

I faced the same issue. There is a simple fix. Go to framework search paths. Remove everything from there. Add ./ and make it recursive. That's it.

like image 121
Gautam Jain Avatar answered Oct 02 '22 14:10

Gautam Jain