A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.

Overview

PhoneNumberKit Platform Build Status Version Carthage compatible

PhoneNumberKit

Swift 5.3 framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.

Features

Features
โ˜Ž๏ธ Validate, normalize and extract the elements of any phone number string.
๐Ÿ’ฏ Simple Swift syntax and a lightweight readable codebase.
๐Ÿ Fast. 1000 parses -> ~0.4 seconds.
๐Ÿ“š Best-in-class metadata from Google's libPhoneNumber project.
๐Ÿ† Fully tested to match the accuracy of Google's JavaScript implementation of libPhoneNumber.
๐Ÿ“ฑ Built for iOS. Automatically grabs the default region code from the phone.
๐Ÿ“ Editable (!) AsYouType formatter for UITextField.
๐Ÿ‡บ๐Ÿ‡ธ Convert country codes to country names and vice versa

Usage

Import PhoneNumberKit at the top of the Swift file that will interact with a phone number.

import PhoneNumberKit

All of your interactions with PhoneNumberKit happen through a PhoneNumberKit object. The first step you should take is to allocate one.

A PhoneNumberKit instance is relatively expensive to allocate (it parses the metadata and keeps it in memory for the object's lifecycle), you should try and make sure PhoneNumberKit is allocated once and deallocated when no longer needed.

let phoneNumberKit = PhoneNumberKit()

To parse a string, use the parse function. The region code is automatically computed but can be overridden if needed. PhoneNumberKit automatically does a hard type validation to ensure that the object created is valid, this can be quite costly performance-wise and can be turned off if needed.

do {
    let phoneNumber = try phoneNumberKit.parse("+33 6 89 017383")
    let phoneNumberCustomDefaultRegion = try phoneNumberKit.parse("+44 20 7031 3000", withRegion: "GB", ignoreType: true)
}
catch {
    print("Generic parser error")
}

If you need to parse and validate a large amount of numbers at once, PhoneNumberKit has a special, lightning fast array parsing function. The default region code is automatically computed but can be overridden if needed. Here you can also ignore hard type validation if it is not necessary. Invalid numbers are ignored in the resulting array.

let rawNumberArray = ["0291 12345678", "+49 291 12345678", "04134 1234", "09123 12345"]
let phoneNumbers = phoneNumberKit.parse(rawNumberArray)
let phoneNumbersCustomDefaultRegion = phoneNumberKit.parse(rawNumberArray, withRegion: "DE",  ignoreType: true)

PhoneNumber objects are immutable Swift structs with the following properties:

phoneNumber.numberString
phoneNumber.countryCode
phoneNumber.nationalNumber
phoneNumber.numberExtension
phoneNumber.type // e.g Mobile or Fixed

Formatting a PhoneNumber object into a string is also very easy

phoneNumberKit.format(phoneNumber, toType: .e164) // +61236618300
phoneNumberKit.format(phoneNumber, toType: .international) // +61 2 3661 8300
phoneNumberKit.format(phoneNumber, toType: .national) // (02) 3661 8300

PhoneNumberTextField

AsYouTypeFormatter

To use the AsYouTypeFormatter, just replace your UITextField with a PhoneNumberTextField (if you are using Interface Builder make sure the module field is set to PhoneNumberKit).

You can customize your TextField UI in the following ways

  • withFlag will display the country code for the currentRegion. The flagButton is displayed in the leftView of the text field with it's size set based off your text size.
  • withExamplePlaceholder uses attributedPlaceholder to show an example number for the currentRegion. In addition when withPrefix is set, the country code's prefix will automatically be inserted and removed when editing changes.

PhoneNumberTextField automatically formats phone numbers and gives the user full editing capabilities. If you want to customize you can use the PartialFormatter directly. The default region code is automatically computed but can be overridden if needed (see the example given below).

class MyGBTextField: PhoneNumberTextField {
    override var defaultRegion: String {
        get {
            return "GB"
        }
        set {} // exists for backward compatibility
    }
}
let textField = PhoneNumberTextField()

PartialFormatter().formatPartial("+336895555") // +33 6 89 55 55

You can also query countries for a dialing code or the dialing code for a given country

phoneNumberKit.countries(withCode: 33)
phoneNumberKit.countryCode(for: "FR")

Need more customization?

You can access the metadata powering PhoneNumberKit yourself, this enables you to program any behaviours as they may be implemented in PhoneNumberKit itself. It does mean you are exposed to the less polished interface of the underlying file format. If you program something you find useful please push it upstream!

phoneNumberKit.metadata(for: "AU")?.mobile?.exampleNumber // 412345678

[Preferrred] Setting up with Swift Package Manager

The Swift Package Manager is now the preferred tool for distributing PhoneNumberKit.

From Xcode 11+ :

  1. Select File > Swift Packages > Add Package Dependency. Enter https://github.com/marmelroy/PhoneNumberKit.git in the "Choose Package Repository" dialog.
  2. In the next page, specify the version resolving rule as "Up to Next Major" with "3.3.3".
  3. After Xcode checked out the source and resolving the version, you can choose the "PhoneNumberKit" library and add it to your app target.

For more info, read Adding Package Dependencies to Your App from Apple.

Alternatively, you can also add PhoneNumberKit to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/marmelroy/PhoneNumberKit", .upToNextMajor(from: "3.3.3"))
]

Setting up with Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate PhoneNumberKit into your Xcode project using Carthage, specify it in your Cartfile:

github "marmelroy/PhoneNumberKit"

Setting up with CocoaPods

source 'https://github.com/CocoaPods/Specs.git'
pod 'PhoneNumberKit', '~> 3.3'
Comments
  • Consider to transfer ownership of PhoneNumberKit to the Community

    Consider to transfer ownership of PhoneNumberKit to the Community

    As of the moment, the library does not get updated frequently, and there is a backlog of pull requests and issues that need to be checked.

    I think it's time for the community to take over this beloved library.

    enhancement help wanted 
    opened by kuyazee 28
  • 3.3.3 injecting numbers randomly

    3.3.3 injecting numbers randomly

    Recently updated from 3.2.0 to 3.3.3

    And now there is some randomly inserted numbers happening. (looks like 1534)

    This looks to be associated with the nationalPrefixTransformRule in the PhoneNumberMetadata.json

    So far, I have only been able to reproduce this behavior with UK

    https://user-images.githubusercontent.com/2423465/109885331-3045f700-7c33-11eb-9df0-86e67b8d4c3f.MP4

    UPDATE: This line seems to be the cause, but it looks as if it existed in 3.2.0 so I am not sure why this is breaking now: https://github.com/marmelroy/PhoneNumberKit/blob/master/PhoneNumberKit/PhoneNumberParser.swift#L286

    Also, in the video, if I type only 1's it inserts 1534, but if I type only 2's it will insert 1481, and again, it is only doing this for the UK. No other country code selected causes this (from the 2 dozen or so i tested anyway)

    I have a number of users complaining since updating that this is happening to them, presently going to revert soon, but bringing attention here

    UPDATE 2: Was finally able to reproduce it in the US, and the number auto inserted in the front is 268. I have also concluded that this is only happening with versions 3.3.2+ as reverting to 3.3.1 successfully removes this issue

    opened by mmdock 22
  • Added flags and example placeholders to TextField

    Added flags and example placeholders to TextField

    This adds an example placeholder and a flag to indicate the current region to PhoneNumberTextField. Both of these additions are opt in to keep backwards compatibility. This functionality has been mentioned several times (#140 #32 #264 #159), and it's clear that a lot of people have built this externally themselves. Providing a default option for these features should help save users a lot of time.

    2019-10-25 18 02 08

    There is one issue to consider, currently with a flag being provided it becomes more clear that 2 countries sharing a single international prefix (Canada & USA) may cause some UI confusion. It seems to me that this should be detected by the partial formatter and thereby should automatically updated when the region code changes the partialFormatter.currentRegion

    enhancement 
    opened by vdka 13
  • Better formatting and a version of AsYouTypeFormatter

    Better formatting and a version of AsYouTypeFormatter

    Formatting of parsed phone numbers for display is still very basic in 0.1 and should be improved in the next version.

    Also, an equivalent to libPhoneNumber's AsYouTypeFormatter would be useful and still within the scope of this framework.

    opened by marmelroy 12
  • SwiftUI view for PhoneNumberTextField

    SwiftUI view for PhoneNumberTextField

    I'm trying to use PhoneNumberKit with SwiftUI views so I can display the formatted number as the user types (using AsYouTypeFormatter). However, this doesn't work. Has anyone tried something with SwiftUI?

    I have the following code that creates a SwiftUI view based on PhoneNumberTextField -

    struct PhoneNumberKitField: UIViewRepresentable {
        
        func makeCoordinator() -> PhoneNumberKitField.Coordinator {
            Coordinator(self)
        }
        
        func makeUIView(context: Context) -> PhoneNumberTextField {
            let phoneTextField = PhoneNumberTextField()
            phoneTextField.delegate = context.coordinator
            return phoneTextField
        }
        
        func updateUIView(_ uiView: PhoneNumberTextField, context: Context) {
            
        }
        
        class Coordinator: NSObject, UITextFieldDelegate {
            var delegate: PhoneNumberKitField
            
            init(_ delegate: PhoneNumberKitField) {
                self.delegate = delegate
            }
        }
    }
    
    stale 
    opened by ankitgogia 11
  • v2.6.0 works incorrectly in production

    v2.6.0 works incorrectly in production

    Everything is flawless in development mode. Once we upload it to Apple, the test flight version doesn't work anymore. It doesn't format nor validates correctly.

    After downgrading to 2.5.1, it works fine.

    bug 
    opened by qgliu 11
  • Feature Request: Get country from a given phone number

    Feature Request: Get country from a given phone number

    Would it be possible to get a country from a given phone number?

    I have a partial solution, my main problem is when the phone number starts with +1 as this generally returns the US, but it might be Canada or any of the Island countries that start with +1xxx.

    Any guidance would be helpful.

    Thanks

    opened by gligorkot 11
  • Mobile number validation doesn't completely work

    Mobile number validation doesn't completely work

    The default value for PH mobile numbers look like this +639xxxxxxxxx or 09xxxxxxxxx, but the library validates +6309xxxxxxxxx as a correct number.

    For ID too it doesn't validate the numbers correctly, it this time it won't accept correct values for the numbers

    Here's my code

    let raw = "Some Number Here"
    do {
         let number = try PhoneNumber(rawNumber: raw)
         print(number.isValidNumber, number.rawNumber)
    } catch {
         print("Phone number parsing error", error)
    }
    
    opened by kuyazee 11
  • parseMultiple EXC_BAD_ACCESS

    parseMultiple EXC_BAD_ACCESS

    When using PhoneNumberKit().parseMultiple() from time to time I have the following issue:

    screen shot 2016-03-02 at 12 10 09

    screen shot 2016-03-02 at 12 12 13

    I didn't really took a look into this more thoroughly, I just want to raise this issue to see if it's already under investigation.

    By the way, love this lib! parseMultiple() is more than 2x more performant than our previous implementation :rocket:

    bug 
    opened by nrako 11
  • Wrong parsing with numbers starting with 00

    Wrong parsing with numbers starting with 00

    For example +992007123456 number from Tajikistan(+992 country code). We lose the second zero in these lines in ParseManager when we call PhoneNumberKit parse function screen1

    screen2 And Formatter knows about one zero screen3 stale 
    opened by revoltMoon 10
  • Parsing phone numbers floods terminal with

    Parsing phone numbers floods terminal with "Updating selectors after delegate removal failed" errors

    I'm using PhoneNumberKit through SPM and when I'm debugging on a device, every single call to parse / format on my phone number kit instance causes the following to be logged:

    2021-02-23 20:39:32.900666-0800 Hang[16567:4063886] [Client] Updating selectors after delegate removal failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 92 named com.apple.commcenter.coretelephony.xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service on pid 92 named com.apple.commcenter.coretelephony.xpc was invalidated from this process.}
    2021-02-23 20:39:32.916084-0800 Hang[16567:4063884] [Client] Updating selectors after delegate removal failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 92 named
    ...
    

    For hundreds of phone numbers this can be thousands of logs in a second. Is this a bug with the framework? If not, is there a way I can fix it or at least suppress the logs?

    This is how it's being called:

    private let kPhoneNumberKit = PhoneNumberKit()
    
    ...
    
            let phoneNumbers = content.contact.phoneNumbers
                .compactMap { try? kPhoneNumberKit.parse($0) }
                .map { kPhoneNumberKit.format($0, toType: .national) }
    

    All of the calls to parse and format are happening on the main thread (to format phone numbers for display in tableview cells).

    opened by AttilaTheFun 10
  • Only change default region if the withFlag is true

    Only change default region if the withFlag is true

    If the flag is not displayed, changing the default region to the last selected is some what confusing to the user as there is no indication of what is selected. If the flag is not displayed, then we stick with the default region which is the users region

    opened by otusweb 0
  • Upgrade libphonenumber

    Upgrade libphonenumber

    We have a lot of Australian number that are marked as not valid (and they shouldn't). It seems that it was a bug on libphonenumber and they fixed it (https://issuetracker.google.com/issues/259292923)

    Is there any plan to upgrade libphonenumber soon?

    Thanks a lot

    opened by DelphineGarcia 3
  • Phone number parsing issue

    Phone number parsing issue

    I encountered phone number parsing issue when trying to parse the phone number which is invalid but prefix of this number is valid country code and rest of the number is valid phone number. See an example:

    Angola phone numbers are valid if they start with 2 or 9 and have nine digits, so the number 376365828 is invalid for country code AO (+244), but +376 is the Andora country code.

    I noticed that PhoneNumberKit isValidPhoneNumber and parse, returns that 376365828 is valid number for country code AO but it should not. I think this part of parse method:

                if numberStringWithPlus.first != "+" {
                    numberStringWithPlus = "+" + numberStringWithPlus
                }
    

    changes the logic because it adds "+" sign at the begining of phone number and then is parsing "+376365828" number which occurs to be valid Andora number. I think isValidPhoneNumber and parse should not behave like this. As a workaround I used parseMultiple method which does not have a additional logic and it seems to be working correctly. But not sure if that was an intension. Please check and advise.

    opened by PrzemekCackowski 0
  • Ghana Country number validation

    Ghana Country number validation

    Hi,

    I have a number which is valid, no doubt over that. But library is still not accepting it. Due to this I am stuck. Please help me.

    Here is the number: +233 592451024

    Please respond ASAP. Thanks

    stale 
    opened by sharjeelAtGit 1
  • same country code bugfix

    same country code bugfix

    Hi, there was a bug when PartialFormatter couldn't determine the country right

    I assume that default region can be used as fallback region if there is not enough information in current metadata. So here is some changes to use it when typing a phone number.

    stale 
    opened by itswaterline 4
Releases(3.5.4)
  • 3.5.4(Jan 9, 2023)

    What's Changed

    • Add missing text field delegate method by @aniastrzezek in https://github.com/marmelroy/PhoneNumberKit/pull/592
    • Updated metadata to version metadata/8.13.4 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/594

    New Contributors

    • @aniastrzezek made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/592

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.5.3...3.5.4

    Source code(tar.gz)
    Source code(zip)
  • 3.5.3(Dec 23, 2022)

    What's Changed

    • Updated metadata to version metadata/8.13.3 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/590
    • Add Equatable conformance for PhoneNumberError by @idrougge in https://github.com/marmelroy/PhoneNumberKit/pull/591

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.5.2...3.5.3

    Source code(tar.gz)
    Source code(zip)
  • 3.5.2(Dec 12, 2022)

    What's Changed

    • Updated metadata to version metadata/8.13.2 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/589

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.5.1...3.5.2

    Source code(tar.gz)
    Source code(zip)
  • 3.5.1(Nov 28, 2022)

    What's Changed

    • Updated metadata to version metadata/8.13.1 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/586

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.5.0...3.5.1

    Source code(tar.gz)
    Source code(zip)
  • 3.5.0(Nov 8, 2022)

    What's Changed

    • Updated metadata to version metadata/8.12.57 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/576
    • Fix macCatalyst OS bug if language is set to Korean by @jackyabcde in https://github.com/marmelroy/PhoneNumberKit/pull/578
    • Fix minor "dispaly" typo by @gsbernstein in https://github.com/marmelroy/PhoneNumberKit/pull/580
    • Updated metadata to version metadata/8.13.0 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/582
    • Introducing the new error ambiguousNumber by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/583

    New Contributors

    • @jackyabcde made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/578
    • @gsbernstein made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/580

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.10...3.5.0

    Source code(tar.gz)
    Source code(zip)
  • 3.4.10(Sep 23, 2022)

    What's Changed

    • Updated metadata to version metadata/8.12.56 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/572
    • Change references to ISO 639 language code into ISO 3166 region code by @idrougge in https://github.com/marmelroy/PhoneNumberKit/pull/571
    • Update flags for countries with the same international code by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/563

    New Contributors

    • @idrougge made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/571

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.9...3.4.10

    Source code(tar.gz)
    Source code(zip)
  • 3.4.9(Sep 10, 2022)

    What's Changed

    • Updated metadata to version metadata/8.12.55 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/568

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.8...3.4.9

    Source code(tar.gz)
    Source code(zip)
  • 3.4.8(Aug 30, 2022)

    What's Changed

    • Fix #557 - Package not compiling for tvOS by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/561
    • Revert #550 due issues with other countries by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/562

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.7...3.4.8

    Source code(tar.gz)
    Source code(zip)
  • 3.4.7(Aug 22, 2022)

    What's Changed

    • Updated metadata to version metadata/8.12.54 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/556

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.6...3.4.7

    Source code(tar.gz)
    Source code(zip)
  • 3.4.6(Aug 18, 2022)

    What's Changed

    • Fix #451 no flag change for different regionCode by @MaxZheleznyy in https://github.com/marmelroy/PhoneNumberKit/pull/550
    • Falling back default region to Locale if CNContactsUserDefaults is not available by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/551
    • Updated metadata to version metadata/8.12.53 by @github-actions in https://github.com/marmelroy/PhoneNumberKit/pull/555

    New Contributors

    • @github-actions made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/555

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.5...3.4.6

    Source code(tar.gz)
    Source code(zip)
  • 3.4.5(Aug 2, 2022)

    What's Changed

    • Updated metadata according to v8.12.52 by @petermolnar-dev in https://github.com/marmelroy/PhoneNumberKit/pull/545

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.4...3.4.5

    Source code(tar.gz)
    Source code(zip)
  • 3.4.4(Jul 19, 2022)

    What's Changed

    • Normalizes the way of getting metadata from MetadataManager by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/542

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.3...3.4.4

    Source code(tar.gz)
    Source code(zip)
  • 3.4.3(Jul 15, 2022)

    What's Changed

    • Simplified default region code discovery by @petermolnar-dev in https://github.com/marmelroy/PhoneNumberKit/pull/538
    • Updated metadata according to 8.12.51. by @petermolnar-dev in https://github.com/marmelroy/PhoneNumberKit/pull/537

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.2...3.4.3

    Source code(tar.gz)
    Source code(zip)
  • 3.4.2(Jul 6, 2022)

    What's Changed

    • Fix bundle search path by @vladyslavsosiuk in https://github.com/marmelroy/PhoneNumberKit/pull/531
    • Updated metadata and related unit-tests according to the v8.12.50 by @petermolnar-dev in https://github.com/marmelroy/PhoneNumberKit/pull/534
    • Fix #249: Potential thread explosion by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/535

    New Contributors

    • @vladyslavsosiuk made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/531
    • @petermolnar-dev made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/534

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.1...3.4.2

    Source code(tar.gz)
    Source code(zip)
  • 3.4.1(May 20, 2022)

    What's Changed

    • Makes RegexManager thread-safe by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/529

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.4.0...3.4.1

    Source code(tar.gz)
    Source code(zip)
  • 3.4.0(May 10, 2022)

    What's Changed

    • Introduce coding strategies by @davdroman in https://github.com/marmelroy/PhoneNumberKit/pull/517

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.3.7...3.4.0

    Source code(tar.gz)
    Source code(zip)
  • 3.3.7(May 4, 2022)

    What's Changed

    • Fix bundle accessor by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/523
    • Keeping a single reference of CTTelephonyNetworkInfo to avoid possible issues by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/521

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.3.6...3.3.7

    Source code(tar.gz)
    Source code(zip)
  • 3.3.6(May 2, 2022)

    What's Changed

    • Accessibility Improvements by @rebeccachin in https://github.com/marmelroy/PhoneNumberKit/pull/439
    • Added modalPresentationStyle Property by @ekucet in https://github.com/marmelroy/PhoneNumberKit/pull/436
    • Fix bundle accessor for SwiftUI previews. by @lukeredpath in https://github.com/marmelroy/PhoneNumberKit/pull/485

    New Contributors

    • @rebeccachin made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/439
    • @ekucet made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/436
    • @lukeredpath made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/485

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.3.5...3.3.6

    Source code(tar.gz)
    Source code(zip)
  • 3.3.5(Apr 21, 2022)

    What's Changed

    • Update flag after pasting/auto-filling a phone number by @AlessandroMulloni in https://github.com/marmelroy/PhoneNumberKit/pull/512
    • Fix Swift 5.6 crash on Linux by @davdroman in https://github.com/marmelroy/PhoneNumberKit/pull/516
    • Updated the UIKit compile time check to work with other platforms when added using SPM by @BobbyRohweder in https://github.com/marmelroy/PhoneNumberKit/pull/435
    • Metadata update: 8.12.47 by @bguidolim in https://github.com/marmelroy/PhoneNumberKit/pull/519

    New Contributors

    • @AlessandroMulloni made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/512
    • @davdroman made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/516
    • @BobbyRohweder made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/435
    • @bguidolim made their first contribution in https://github.com/marmelroy/PhoneNumberKit/pull/519

    Full Changelog: https://github.com/marmelroy/PhoneNumberKit/compare/3.3.4...3.3.5

    Source code(tar.gz)
    Source code(zip)
  • 3.3.4(Feb 22, 2022)

    • Metadata updates for release 8.12.43
    • Build and bug fixes
    • Easily generate callable URL from a PhoneNumber

    Thanks @alak, @horevoigt, @sachithamh, @benlmyers, @fuyoufang, @crnjan, @JonathanDowning , @rebello95, @WyattMufson, @bguidolim, @dmiluski, @nidegen

    Source code(tar.gz)
    Source code(zip)
  • 3.3.3(Jan 17, 2021)

  • 3.3.2(Jan 17, 2021)

    • Fixed parsing RU number with KZ region set (or main country code with not main country code region). Thanks @crnjan.
    • Improved Linux support. Thanks @kabouzeid .
    • Fix autocomplete phone bug. Thanks @dimakalachniuk
    • Use decodeIfPresent method for optional values instead of optional try. Thanks @HugoSay.
    • Updated build settings. Thanks @olejnjak and @twitterkb .
    • Improved access modifiers. Thanks @st-small .
    • Fix deprecated subscriberCellularProvider. Thanks @jireton.
    • Metadata updates.
    • Copyright update.
    Source code(tar.gz)
    Source code(zip)
  • 3.3.1(Sep 25, 2020)

    • Bring back support for iOS9 as deployment target (thanks @Marcocanc)
    • Add support for textFieldDidEndEditing:reason: (thanks @RodrigoLGuimaraes)
    • Add missing platform support for SPM (thanks @sereivoanyong)
    Source code(tar.gz)
    Source code(zip)
  • 3.3.0(Sep 20, 2020)

    • Better support for SPM, taking advantage of the ability to include resources [thanks @StatusQuo, @t-unit]
    • Metadata updates for release 8.12.9
    • Updates min deployment target and CI set up.
    • Bug fixes from @RobinDaugherty, @perihelia, @twitterkb, @michalsrutek and @FadyDerias
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Nov 16, 2019)

    • Metadata updates.
    • Support for pause waits (thanks @devprodoctor)
    • Support textfield did change notification (thanks @dmitriykotenko)
    • Swift package manager and linter fixes (thanks @kuyazee)
    • Improved PhoneNumberTextField (thanks @vdka)
    • Additional fixes and improvements
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Aug 5, 2019)

  • 2.6.0(Feb 10, 2019)

  • 2.5.1(Feb 3, 2019)

  • 2.5.0(Sep 30, 2018)

    • Swift 4.2 and Xcode 10 support.
    • Metadata updates!
    • Ability to override location of the metadata json file (thanks @ashleybrgr).
    • PhoneNumber is now coddle (thanks @nichdu)
    • PhoneNumberTextField bug fixes (thanks @polqf)
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Nov 26, 2017)

    • Fix deprecation warnings, Carthage and Xcode 9.1 build issues (thanks @dmcgloin, @ezefranca, @sbystrov)
    • Metadata updates for release 8.8.5
    • Fix bugs relating to missing prefix (thanks @redcapua)
    • Swift package manager support (thanks @Coledunsby)
    Source code(tar.gz)
    Source code(zip)
Owner
Roy Marmelstein
Ya tu sabes.
Roy Marmelstein
Custom UITextFields effects inspired by Codrops, built using Swift

TextFieldEffects I fell in love with the text inputs effects in this article. As an exercise I decided to recreate as many of them as I can using Swif

Raul Riera 5.8k Dec 26, 2022
My first cocoapod framework

TaniwhaTextField Introduction TaniwhaTextField is a lightweight and beautiful swift textfield framework. It has float label pattern, and also you can

Liguo Jiao 26 Jan 12, 2022
A Credit Amount and EMI User Interface build in Swift and SwiftUI

App Usage An iPhone application build in swift . Overview Supported on All iPhone Screen Sizes Dynamic Data following MVVM Design Pattern Used Transit

Mohammad Yasir 4 Apr 20, 2022
A Float Input View with smooth animation and supporting icon and seperator written with Swift

RSFloatInputView Features Smooth animation using CoreText Support optional left icon Support optional seperator Configurable padding, size, fonts and

null 103 Nov 13, 2022
VKPinCodeView is simple and elegant UI component for input PIN. You can easily customise appearance and get auto fill (OTP) iOS 12 feature right from the box.

Features Variable PIN length Underline, border and custom styles The error status with / without shake animation Resetting the error status manually,

Vladimir Kokhanevich 95 Nov 24, 2022
An auto-layout base UITextView subclass which automatically grows with user input and can be constrained by maximal and minimal height - all without a single line of code

Deprecated This library is no longer maintained and is deprecated. The repository might be removed at any point in the future. MBAutoGrowingTextView A

Matej Balantiฤ 125 Jan 13, 2022
Awesome TextField is a nice and simple libriary for iOS and Mac OSX

Awesome TextField is a nice and simple libriary for iOS and Mac OSX. It's highly customisable and easy-to-use tool. Works perfectly for any registration or login forms in your app.

Alexander Shoshiashvili 225 Nov 21, 2022
A simple and easily customizable InputAccessoryView for making powerful input bars with autocomplete and attachments

InputBarAccessoryView Features Autocomplete text with @mention, #hashtag or any other prefix A self-sizing UITextView with an optional fixed height (c

Nathan Tannar 968 Jan 2, 2023
TTextField is developed to help developers can initiate a fully standard textfield including title, placeholder and error message in fast and convinient way without having to write many lines of codes

TTextField is developed to help developers can initiate a fully standard textfield including title, placeholder and error message in fast and convinient way without having to write many lines of codes

Nguyen Duc Thinh 7 Aug 28, 2022
A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift.

SkyFloatingLabelTextField SkyFloatingLabelTextField is a beautiful, flexible and customizable implementation of the space saving "Float Label Pattern"

Skyscanner 4k Jan 1, 2023
An UITextView in Swift. Support auto growing, placeholder and length limit.

GrowingTextView Requirements iOS 8.0 or above Installation CocoaPods GrowingTextView is available through CocoaPods. To install it, simply add the fol

Kenneth Tsang 941 Jan 5, 2023
RichTextKit is a Swift-based library for working with rich text in UIKit, AppKit and SwiftUI.

About RichTextKit RichTextKit is a Swift-based library that lets you work with rich text in UIKit, AppKit and SwiftUI. RichTextKit is under developmen

Daniel Saidi 282 Dec 28, 2022
DTTextField is a custom textfield with floating placeholder and error label

DTTextField Introduction DTTextField is a UITextField library with floating placeholder and error label. Floating placeholder inspired from JVFloatLab

Dhaval Thanki 310 Jan 5, 2023
A custom TextField with a switchable icon which shows or hides the password and enforce good password policies

PasswordTextField A custom TextField with a switchable icon which shows or hides the password and enforces good password policies, written in Swift. โญ

Chris Jimenez 304 Dec 29, 2022
StyledTextKit is a declarative attributed string library for fast rendering and easy string building.

StyledTextKit is a declarative attributed string library for fast rendering and easy string building. It serves as a simple replacement to NSAttribute

GitHawk 1.2k Dec 23, 2022
๐Ÿ„โ€โ™‚๏ธ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews

' __________________ _______ _________ _______ _________ _______ _ ______ ' |\ /|\__ __/\__ __/( ____ \|\ /

Thanh Pham 446 Nov 24, 2022
Focus text field in SwiftUI dynamically and progress through form using iOS keyboard.

Focuser Focuser allows to focus SwiftUI text fields dynamically and implements ability move go through the form using Keyboard for iOS 13 and iOS 14.

Art Technologies 118 Dec 25, 2022
Currency text field formatter available for UIKit and SwiftUI ๐Ÿ’ถโœ๏ธ

CurrencyText provides lightweight libraries for formating text field text as currency, available for both UIKit and SwiftUI. Its main core, the Curren

Felipe Lefรจvre Marino 183 Dec 15, 2022
Animated Subclass of UITextField created with CABasicAnimation and CAShapeLayer

JDAnimatedTextField JDAnimatedTextField is animateable UITextField that can significantly enhance your user's experiences and set your app apart from

Jawad Ali 25 Dec 13, 2022