See all Blogs

Shahroz Bakht

Dependency Management Improvements for iOS and ANDRIOD

Dependency management is very critical yet can be the least favorite aspect when it comes to app development. Firebase is continuously working on improving dependency management and versioning for our firebase iOS SDKs, and putting a spotlight on our Firebase BoM (“Bill of Material”) for android. Firebase's goal is to provide users an easy operation and help them to pick the best SDK version to build an app without any fuss to enjoy the experience as well.

Using a unified versioning model on iOS:

A unified versioning model can be helpful in terms of many factors. Firebase SDK for each product maintained its version number for both the SDK and the CocoaPod, earlier. This was convenient but, this also had few drawbacks according to user feedback. The unified version will now be used in the same Unified version number for its iOS SDK. At each release of any update, this version will update for all iOS SDKs. By selecting the same SDK version number across all Firebase products, they will be designed to be compatible with one another. For patch releases, the affected product will be compatible with each product at the same minor version. Also, run pod update to install the latest patches for all products.

Easy contribution to open source libraries:

In the unified version model, we directly map Firebase with firebase SDK integrations to a single tag in GitHub for both CocoaPods and swift package Manager. This new model makes it easy for the contributor to understand our release and versioning strategy, unlike the previous model, whenever a product was released a new individualized tag was created, which makes it harder to understand which product tag match each other while integrating multiple firebase product.

Swift Package Manager:

The motivation to move to this model was a unified versioning system that closely mirrors the conventions used in the Swift Package manager. Swift Package Manager is now in beta as well.

Using Firebase BoM on Andriod to simplify dependency management:

Firebase leverages Gradle’s support for Andriod BoMs to manage the versions for all libraries by specifying a single BoM version to the app. When using firebase BoM, set a single Firebase android version and, and the BoM will pull in this version of the libraries mapped to that specific BoM.

Manage library Dependency via the firebase BoM:

While using firebase BoM, the user has to specify the BoM version they want to use, and the BoM will manage which library version to use, and all these versions will be cross-compatible.

Overriding library dependency using a Firebase BoM:

Users can also override the library version specified in the BoM, including the desired version in the library’s dependency declaration. The goal behind using it is to avoid needing to do this in your project. BoM versions are curated to include that all work well together.

Firebase aims for improvement to enhance their user’s experience. Firebase support its user to get their journey started on Firebase and always appreciate our user to reach out to us for any feedback!

  See all Blogs