Srivathsava K
Srivathsava K

Reputation: 447

Adding/Refering the additional projects in existing project

I have built a iOS app which requires a library files. I have created them (static libraries .a extension files), there are actually projects also which I want to include them to my project.

What is the good procedure to follow.

  1. Do we need to include the projects with in our projects as library & make just reference path(make an external reference) to them or Directly include them to our project folder.

  2. If we include the project will the size of the existing project build file increases.

Thanks

Upvotes: 1

Views: 116

Answers (3)

fsaint
fsaint

Reputation: 8759

My favorite method is to use cocoa pods. Cocoa pods keeps your libraries up to date from their corresponding github projects. Go to the cocoa pods site for details. But the outline of the steps is:

  1. Install the cocoa pods ruby gem
  2. Add a library dependency file into your proyect. The "Podfile"
  3. run "pod install" to install the proyect. This will create a ".xcworkspace" that you will use on xcode instead of your ".xcodeproj".

Cocoa pods will download the library and integrate it to your xcode workspace. If is not perfect but I have found it to be the best way to maintain your external dependencies.

For this to work the library you anre including must have been made a "pod". That means having a podspec file in a publicly accesible URL. Most relevant Objective-C open source libraries have one.

Upvotes: 1

Nithin Michael
Nithin Michael

Reputation: 2186

This will explain including libraries into existing project. Have a look at that. Hope it will help you.

Upvotes: 1

Mathijs
Mathijs

Reputation: 1268

If I were you I would include them and made sure I checked "copy to destination folder", so the project is complete and transferable, and can compiled non-locally as well.

Upvotes: 1

Related Questions