PippinCore's main goal is to decouple dependencies from your app, allowing you to swap in different third party frameworks, hand rolled versions or test mocks/fakes of production counterparts, with no changes to your codebase.
PippinCore has three main areas:
The basic building blocks of Pippin: stable APIs that sit between app code and dependencies, delivered via data structures and protocols.
Environment contains a property for each component, peripheral, and environment info.
PippinCore abstracts some major aspects of an app into protocols describing how they should work:
Model: data modelling (WIP: for now just usePippinAdapters/CoreDataAdapter)CrashReporterBugReporterLoggerAlerterInAppPurchaseVendorActivityIndicator
These form a Facade that sits in between your app code and dependencies, and Adapter implementations to those protocols are supplied in PippinAdapters.
A few protocols define cross-cutting concerns among many components:
Themeable: provide access toUIAppearanceProxybased theming of UI elementsDebuggable: deliver UI controls to exercise and manipulate UI components, for use by developers and testersEnvironmentallyConscious: provides a reference back to theEnvironmentinstance to which an instance belongs, allowing it to use other components: everything may access the logger, the logger may access the crash reporter to leave breadcrumbs, and the bug reporter may access the data model to export the database with the bug report
Locator: location/GPS
- Settings bundles
- Analytics
- Push notifications
- State restoration
- App walkthrough