Skip to main content
Add the package with Swift Package Manager: in Xcode choose File > Add Package Dependencies and enter https://github.com/MilsatLtd/postcode-widget-swift, then add the NipostPostcodeWidget product to your app target. The first release is pending; the URL above is where it will be published. The SDK is developed privately and distributed from that repository as a compiled framework.

Usage

An async variant returns the selection directly:
show() presents the widget flow — identity screen (replaced by a confirm screen when prefilledIdentifier is set), saved postcodes, and the map-based discover flow — and delivers the PostcodeSelection, or nil if the user closed without picking. selection.toJSON() produces exactly the wire shape every other SDK delivers.

Configuration

The SDK requires iOS 15+ and brings its own UI, so any iOS app works. Add NSLocationWhenInUseUsageDescription to your app’s Info.plist for the “Get Postcode on Map” discover flow — the widget requests location permission itself at the moment of use.