refreshConfiguration
Manually refreshes the Superwall configuration. Intended for development and wrapper SDKs.
This method is intended for development workflows (for example, wrapper SDK hot reloading) and should not be called during normal app runtime. It triggers extra network requests and re-caches paywalls.
Purpose
Fetches the latest configuration from the Superwall dashboard and refreshes cached paywalls. Useful when iterating on paywalls during development without restarting the app.
Signatures
public func refreshConfiguration() async
public func refreshConfiguration(completion: (() -> Void)? = nil)Parameters
completion(optional): Called after the refresh finishes when using the completion-based API.
Returns / State
- Refreshes configuration and reloads any paywalls that have changed or been removed.
- Does not return a value.
- Development-only; avoid calling in production code paths.
Usage
Refresh configuration after editing paywalls in development:
Task {
await Superwall.shared.refreshConfiguration()
// Updated paywalls will be used on the next presentation
}Objective-C or completion-based refresh:
Superwall.shared.refreshConfiguration {
// Handle post-refresh work here
}Related
configure()- Initial configuration of the SDKPaywallOptions/shouldPreload- Controls whether paywalls are preloadedpreloadAllPaywalls()- Preload paywalls manually
How is this guide?
Edit on GitHub