Add binary dependencies to the project.
- 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:
- 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 these libraries and their headers:
- [MAF] libMAFFormatters
- libMAFLogger.a
- libMAFZipHelper.a
- Add these frameworks / system libs:
- [iOS] QuartzCore.framework
- [system] libstdc++.dylib
- libz.dylib
- 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.
- 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.
- Set the path as recursive to tell the linker to search for libraries
recursively, so you need not specify each path separately.
- 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/**"):
- Finally, add the -all_load -ObjC linker flags (See Build Settings for
clarification).