A Swift library providing country flags, dial codes, and localization data for iOS apps, compatible with both UIKit and SwiftUI.
FlagAndCountryCode is a Swift library that provides iOS developers with comprehensive country data including flags, dial codes, and language information. It solves the problem of manually managing country assets and codes when building features like phone number input forms, country selection pickers, or internationalized interfaces.
iOS developers building applications that require country selection, international phone number input, or localization features, particularly those using either UIKit or SwiftUI frameworks.
Developers choose FlagAndCountryCode because it provides a complete, ready-to-use solution for country data with dual framework support, eliminating the need to source and maintain flag assets and country code databases separately.
A country code and flag icon provider library for iOS apps
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes country names, 2-letter codes, dial codes, and native/English language names for every country, as listed in the README, eliminating the need for separate data sources.
Works seamlessly with both UIKit and SwiftUI, returning UIImage for UIKit and View for SwiftUI, making it versatile for different iOS project types.
Offers three flag image styles with specific dimensions: roundedRect (21x15), square (15x15), and circle (15x15), providing flexibility for UI design.
Access all country data via a simple static property `CountryFlagInfo.all` and generate flags with a single method call like `getCountryImage(with:)`, simplifying implementation.
Requires iOS 15 or later, excluding support for apps targeting older iOS versions, as specified in the requirements.
Cocoapods is deprecated after version 1.1.2, forcing teams not using Swift Package Manager to rely on older versions or switch dependency managers.
Flag images come in predefined, non-customizable sizes (e.g., 21x15 for roundedRect), which might not fit all UI design needs without additional work.