https://github.com/MilsatLtd/postcode-widget-swift, then add the
NipostPostcodeWidget product to your app target.
Pin Up to Next Major Version from 0.1.0, or in a Package.swift:
Usage
show() presents the widget flow: the identity screen (replaced by a
confirm screen when prefilledIdentifier is set), saved postcodes, and the
map-based discover flow. It 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.
