1 min read
Customisation Points
Last Updated - Platform 24.0 - SDK 19.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 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 theProductCard
. - 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 StoreFinderViewController
using the StoreFinderBuilder
and can be easily replaced via Containers.
// You can omit the generic type to use the default 'StoreFinderViewController'.Container.shared.coordinators.storeFinder.replace { PoqStoreFinderCoordinator() { // Customise the builder here. StoreFinderBuilder() }}
// Here is a more fully customised example.Container.shared.coordinators.storeFinder.replace { PoqStoreFinderCoordinator<CustomStoreFinderViewController>() { StoreFinderBuilder() .analytics(middleware: .customStoresAnalytics()) .middleware(.customFun()) }}