1 min read

Customisation Points

Last Updated - Platform 24.0 - SDK 19.0

From v22 onwards most features require no code as they are automatically set up by the Coordinators that construct them. This page documents the key customisation points and all dependencies.

Overview

The Stores features exist as two key frameworks:

  • The PoqStores framework for the Stores UI presentation layer.
  • The PoqStoresClient framework for the Stores domain and data layers.

For Store Availability, the Stores features have the following additional dependencies:

  • The PoqCatalogue framework for the common Product UI presentation layer such as the ProductCard.
  • The PoqCatalogueClient framework for the Product domain layer and it's objects.

Container Dependencies

Containers can be used to replace most feature dependencies with one line of code. For the Stores features this should be done in the AppModule on didAddToPlatform in an organised function such as setUpStores or setUpDependencies.

Customise the Coordinator

The Coordinator builds the StoreDetailsViewController using the StoreDetailsBuilder and can be easily replaced via Containers.

// You can omit the generic type to use the default 'StoreDetailsViewController'.
Container.shared.coordinators.storeDetails.replace {
PoqStoreDetailsCoordinator() {
// Customise the builder here.
StoreDetailsBuilder()
}
}
// Here is a more fully customised example.
Container.shared.coordinators.storeDetails.replace {
PoqStoreDetailsCoordinator<CustomStoreDetailsViewController>() {
StoreDetailsBuilder()
.analytics(middleware: .customStoresAnalytics())
.middleware(.customFun())
}
}