I'm new to programming on iOS and I'm running into a roadblock with adding dependencies to my repository.
When I drag and drop a framework into the project directory and reference everything, I can build the project no problem. The issue is when I commit my project to the repository, the framework files do not get copied over. I can see that they are located in their original directory in some other location. Xcode merely references these files instead of adding them to the project directory.
So my question is, how do you add a framework or dependency to a project directory and commit it alongside your project to your repository?
Note I'm using SVN, however a Version Management System agnostic solution works for me.
Best How To :
In your case, or most cases people just download the framework and add it from there directly though it works in their machines, but will not work in other machine, because of absolute path added to the
Header Search Paths settings in
In case of
Third Party frameworks are as follows, will work for any case. Add the relative path rather than absolute path, though you don't set it, it is automatically added while you add a framework. So what are the steps? See below
Create a folder named framework inside your svn/git folder of your project, and put all the frameworks inside the folder..
Now add the framework, from the
framework folder as you were doing earlier.
Header Search Paths in
Build Settings. You will see entry for your framework header path. It should look something like
Change the above entry by
Doing the above will automatically change this
/Users/username/ProjectFolder/Project/ part of your path according to any system you clone the project. And it will work automatically.
Note - Before performing the steps, remove all old Header entries, which has absolute path.
Hope it helps. Cheers.