How to build frameworks aggregating multiple other libraries or frameworks

Purpose of this page

This page explains how frameworks representing aggregations from multiple libraries or frameworks can be built with the xcode-maven-plugin.


If you are a library or a framework provider and you have separated your code into multiple project, it may happen that your consumers have to deal with separate multiple libraries or frameworks. To facilitate this consumption, you could provide an aggregated framework, combining the commonly used together separate libraries or frameworks.

Step-by-step Guide

  • Create Xcode Framework Project. See Building a Static Xcode Framework for detailed information concerning this step.
  • Create a dummy header and an implementation file.
  • Create the project pom and declare as dependencies the frameworks and/or libraries you want to aggregate. See the Project Structure and Project Pom for detailed information concerning these steps.
  • Call mvn initialize to get the dependent projects locally.
  • Link all binaries you want to aggregate - add the binaries into "Link Binary with Libraries" Build Phases. Make sure the binaries are linked as "Required" (which is the default option).
  • Expose all headers from the dependent libraries or frameworks also as "Public" - drag and drop all public headers from the dependent frameworks and libraries into "Copy Headers" Build Phases.
  • Expose all bundle resources if there are some - drag and drop the bundle resources from the dependent frameworks and libraries into "Copy Bundle Resources" Build Phases.
  • Call mvn install to finally build the aggregated framework.