Skip to content

Mobile Native Support #79

Description

@stefashkaa

Feature Title

Mobile Native Support (React Native, Ionic, Swift, Kotlin)

Description

@desource/phone-mask currently provides excellent web-first support (core + Vue/React/Svelte/Nuxt), but there is no official mobile-native strategy.
We need first-class support for mobile platforms so teams can keep one phone-formatting/validation standard across web and native apps.

Considered platforms:

  • React Native
  • Ionic (Capacitor/Cordova apps)
  • Swift (iOS)
  • Kotlin (Android)

Goals:

  • Keep behavior/parity with core library rules (masking, completeness validation, country switching).
  • Reuse the same metadata source and update workflow.
  • Preserve performance and lightweight footprint.
  • Provide official docs/examples for each platform.

Use Case

Many teams run multi-platform products:

  • Web app (already using phone-mask)
  • Mobile app (React Native or native iOS/Android)
  • Hybrid app (Ionic)

Without official mobile-native support, each app stack uses different phone libraries and behavior diverges (validation mismatch, formatting mismatch, inconsistent UX).
We want one consistent phone input/validation strategy across all clients.

Proposed Solution

Consider cross platform solutions:

  • Design React Native package/hook with country-aware formatting + validation
  • Publish Ionic integration guide/package (Angular/React/Vue usage patterns). Angular support will be added in Design Angular version of phone-mask #9

Consider native SDK approach by developing:

  • Swift (iOS) library
  • Kotlin (Android) library

Alternatives Considered

  • Keep only web support and maintain community guides (lower maintenance, but no official parity guarantees)

Examples from Other Libraries

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions