Show TOC

Adding Binary DependenciesLocate this document in the navigation structure

Add binary dependencies to the project.



  1. With the project selected in the Project Navigator, select the app target in the middle pane (this is only one of several ways to set up static library dependencies in Xcode). Click the Build Phases tab, then the Link Binary with Libraries drop-down:

    Link Binary with Libraries
  2. Click the + sign, then click Add Other. Browse to the directory containing the libMAFUIComponents.a and libMAFExtensibility.a, and add them one by one.

    Add Libraries
  3. Add these libraries and their headers:
    • [MAF] libMAFFormatters
    • libMAFLogger.a
    • libMAFZipHelper.a
  4. Add these frameworks / system libs:
    • [iOS] QuartzCore.framework
    • [system] libstdc++.dylib
    • libz.dylib
  5. 4. After you have added all the required frameworks and static libraries to your project, select Build Settings, and make sure all settings are visible by clicking All (rather than Basic). Scroll down to Library Search Path and double-click the corresponding line.
    The paths for the libraries you added are automatically supplied by Xcode. However, these constant paths are valid only for the current platform and build type. To make this setting generic, adapt it by using the ${PROJECT_DIR}, ${BUILD_STYLE}, and ${PLATFORM_NAME } environment variables.
    1. Delete the two paths inserted by Xcode, and add: "${PROJECT_DIR}/target/libs/${BUILD_STYLE}-${PLATFORM_NAME}/**".
      This results in a library path configuration that that consists of only two lines and points to the parent libs directory in the project directory, which holds the library files.
    2. Set the path as recursive to tell the linker to search for libraries recursively, so you need not specify each path separately.

      Set Library Path
  6. Next, set up the header path. Double-click Header Search Path, and set the path to point to the MAF Extensibility and MAFUIComponents headers ("${PROJECT_DIR}/target/headers/**"):

    Set Header Path
  7. Finally, add the -all_load -ObjC linker flags (See Build Settings for clarification).

    Add Linker Flags