1 min read
Customise
Last Updated - Platform 22.0.0 - SDK 17.0.0From v22 onwards most features require no code as they are automatically set up by the Coordinators that construct them. This page highlights the key customisation points for this feature.
Overview
The Product List feature is made up of three key frameworks:
- The
PoqProductList
framework for the Product List UI presentation layer. - The
PoqCatalogue
framework for the common Product UI presentation layer including theWishlistWidget
. - The
PoqCatalogueClient
framework for the Product domain and data layers.
These frameworks have the following relevant dependency:
- The
PoqWishlistClient
framework for theWishlistWidget
domain and data layers.
Container Dependencies
Containers can be used to replace most feature dependencies with one line of code.
For the Product List feature this should be done in the AppModule
on didAddToPlatform
in an organised function such as setUpProductList
or setUpDependencies
.
See views for a comprehensive list of views in this feature.
Customise the Coordinator
The Coordinator builds the ProductListViewController
using the ProductListBuilder
and can be easily replaced via Containers.
// You can omit the generic type to use the default 'ProductListViewController'.Container.shared.coordinators.productList.replace { PoqProductListCoordinator() { // Customise the builder here. ProductListBuilder() }}
// Here is a more fully customised example.Container.shared.coordinators.productList.replace { PoqProductListCoordinator<CustomProductListViewController>() { ProductDetailsBuilder() .withAnalyticsMiddleware(.customProductDetailsAnalytics()) .withMiddleware(.customFun()) }}