Feature Title
Native iOS (Swift) Support with SPM Distribution
Description
Parent: #79
Add a native Swift implementation to support iOS apps directly, with behavior aligned to @desource/phone-mask core metadata and formatting rules.
Use Case
iOS-native teams need the same phone formatting/validation logic as web clients and future RN support, without bridging through JS runtime.
Proposed Solution
- Publish a Swift package (SPM) (working name: PhoneMaskKit).
- Core API should include:
- Format by country
- Extract raw digits
- Validate completeness against mask variants
- Country switching helpers
- Optional UI adapters:
- UIKit (UITextField integration)
- SwiftUI example wrapper
- Include cross-platform parity fixtures against core package outputs.
Alternatives Considered
- Wrap web package inside WebView/JS bridge (not ideal for native UX/performance).
Examples from Other Libraries
Feature Title
Native iOS (Swift) Support with SPM Distribution
Description
Parent: #79
Add a native Swift implementation to support iOS apps directly, with behavior aligned to
@desource/phone-maskcore metadata and formatting rules.Use Case
iOS-native teams need the same phone formatting/validation logic as web clients and future RN support, without bridging through JS runtime.
Proposed Solution
Alternatives Considered
Examples from Other Libraries