Adding Frameworks to Project in Xcode 5 and Having *Relative* Paths Added

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

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.

Xcode - use relative paths instead of direct path for Framework Search Paths

You can use $(SRCROOT) if you want to refer paths relative to your source directory. Refer this from apple docs. There are bunch of these kind of variables. But in Build settings they will be shown as expanded, once you open it for editing it will resort it to the relative path variable.

Between if you are adding frameworks to your project, will be good if you consider using CocoaPods. Framework/package management will be a piece of cake with it. And the learning curve is also quite smooth.(I don't think if there is a learning curve at all)

The frameworks' link path has changed after the project moved to another place

You can use $(SRCROOT) if you want to refer paths relative to your source directory . $(SRCROOT) will point where your project files are . apple doc

An example :

if you have a directory x in your MyApp folder which contains your project file then the folder x can be reffered as $(SRCROOT)/x. Enter this in frameworks path section in Build settings to refer to your library .

Xcode 5 Framework/Library Search Path Absolute Address

Here's what i did:

$(SRCROOT)/"subfolder"/"subfolder"/"framework"

This is what we're using before in previous Xcode versions. The reason why it wasn't working with Xcode5 is because; for some reason, whenever you add another framework to your project, it automatically adds a "\" so you need to remove those to make it work. I don't know why it does that.

Does adding a framework to a project folder increase binary size?

The app size should not be affected by simply copying framework from other location to project directory.

Also the compiled objects links to framework binary, most times framework is not embedded in app file. But it really depends on what framework you are dealing with, in Xcode 6, you may need to embed a framework in Embedded Binaries (with signing) to your project, and thus app size is affected.



Related Topics



Leave a reply



Submit