Add the dependency
Add it under The built-in Shared Preferences and Database tools depend on
dev_dependencies so it is excluded from production
archives (see Production Builds):shared_preferences and sembast. If your app already uses them (every
CARP app does), no extra setup is needed.Follow Production Builds so release builds
compile and ship nothing from the toolkit package. If you instead add it under
dependencies and only set enabled: false at runtime, the package is
still in the archive and some users might find a way to access it.Platform configuration
- iOS
- Android
Minimum deployment target iOS 15.0. The plugin supports both Swift
Package Manager and CocoaPods but SPM is recommended.
If you switch a project from CocoaPods to SPM, run
pod deintegrate
first and make sure ios/Podfile’s platform :ios is at least 15.0.Wrap your app
Continue to the Quickstart to wrap
your app’s root widget in
CarpDebugToolkit.Keeping it out of production
It is recommended that the toolkit be excluded from the release archive. As adev_dependency, reference it
only from kDebugMode-gated code so it is both disabled at runtime and excluded
from the release archive. The full pattern (app-local hook, debug-only setup
file, per-platform exclusion details) is on the
Production Builds page.
CarpDebugToolkit also accepts an enabled flag (defaults to true) for cases
where the package stays in the build but you want a runtime switch.
When enabled is false, CarpDebugToolkit returns its child untouched with
zero overhead.