Often it is useful to include external libraries in your module, this can be done on both Android and iOS.
Important: Class names must be unique across all modules and the core Forge app: this means multiple modules cannot include the same libraries. In the future we will be supporting dependencies between modules to allow shared libaries; until then if multiple modules include the same libraries only one of them can be enabled for any individual app.
To include libraries copy them into the
in your module. Once in place update your inspector project through the
Toolkit and the libraries will be included in the inspector project as
they would be in a Forge build.
Both Java and native libraries are supported: native libraries should be placed in a sub-folder to indicate the architecture they're built for - see Structure of a module.
If the library you want to include is distributed as unbuilt Java files, you can include that code in your own module source tree and export it as part of the JAR file from Eclipse.
On iOS, there are two two types of external libraries: system frameworks made available by Apple, and 3rd party frameworks.
To include Apple frameworks an add_ios_system_framework build step must be added to link with the framework at build time.
Once added the inspector project should be updated to apply this change while you develop your module.
There are a number of different formats used to distribute 3rd party libraries for iOS: not all of them are directly compatible with Forge, but with some minor changes they can all be included in a module: