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
  • 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

    opened by sharjeelAtGit 0
  • 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.

    opened by itswaterline 3
Releases(3.5.3)
  • 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)
  • 2.0.0(Sep 19, 2017)

Owner
Roy Marmelstein
Ya tu sabes.
Roy Marmelstein
A library for formatting strings on iOS and macOS

Sprinter Introduction What? Why? How? Usage Installation Integration Localization Thread Safety Advanced Usage Introduction What? Sprinter is a librar

Nick Lockwood 168 Feb 6, 2022
OysterKit is a framework that provides a native Swift scanning, lexical analysis, and parsing capabilities. In addition it provides a language that can be used to rapidly define the rules used by OysterKit called STLR

OysterKit A Swift Framework for Tokenizing, Parsing, and Interpreting Languages OysterKit enables native Swift scanning, lexical analysis, and parsing

Swift Studies 178 Sep 16, 2022
Markdown parsing and rendering for iOS and OS X

CocoaMarkdown Markdown parsing and rendering for iOS and macOS CocoaMarkdown is a cross-platform framework for parsing and rendering Markdown, built o

Indragie Karunaratne 1.2k Dec 12, 2022
Croc is a swift emoji string parsing library

Croc is a library for parsing emojis on iOS. It provides a simple and lightweight interface for detecting, generating, categorizing and managing emoji characters, making emoji-powered features an easy task for developers.

Joe Kalash 127 Nov 20, 2022
Swift emoji string parsing library

Croc is a library for parsing emojis on iOS. It provides a simple and lightweight interface for detecting, generating, categorizing and managing emoji

Joe Kalash 125 Sep 27, 2021
An NSPredicate DSL for iOS, OSX, tvOS, & watchOS. Inspired by SnapKit and lovingly written in Swift.

PrediKit A Swift NSPredicate DSL for iOS & OS X inspired by SnapKit, lovingly written in Swift, and created by that weird dude at KrakenDev. If you're

Hector Matos 542 Sep 24, 2022
Powerful text framework for iOS to display and edit rich text.

YYText Powerful text framework for iOS to display and edit rich text. (It's a component of YYKit) Features UILabel and UITextView API compatible High

null 8.8k Jan 4, 2023
A Swift framework for using custom emoji in strings.

Emojica โ€“ a Swift framework for using custom emoji in strings. What does it do? Emojica allows you to replace the standard emoji in your iOS apps with

Dan 101 Nov 7, 2022
The iOS framework that grows only as fast as its documentation

Nimbus is an iOS framework whose feature set grows only as fast as its documentation. Support status Nimbus is in a supported maintenance mode, meanin

featherless 6.5k Nov 30, 2022
An Objective-C framework for converting Markdown to HTML.

MMMarkdown MMMarkdown is an Objective-C framework for converting Markdown to HTML. It is compatible with OS X 10.7+, iOS 8.0+, tvOS, and watchOS. Unli

Matt Diephouse 1.2k Dec 14, 2022
Heimdall is a wrapper around the Security framework for simple encryption/decryption operations.

Heimdall In Norse mythology, Heimdall is the gatekeeper of Bifrรถst, the rainbow road connecting Midgard, realm of the humans, to Asgard, the realm of

Henri Normak 393 Nov 23, 2022
A simple and customizable Markdown Parser for Swift

MarkdownKit MarkdownKit is a customizable and extensible Markdown parser for iOS and macOS. It supports many of the standard Markdown elements through

Bruno Oliveira 687 Dec 18, 2022
Swift String Validator. Simple lib for ios to validate string and UITextFields text for some criterias

Swift String validator About Library for easy and fastest string validation based on ัciterias. Instalation KKStringValidator is available through Coc

Kostya 17 Dec 21, 2019
๐ŸŒโฉ๐Ÿ“„ Convert ISO8859 1-16 Encoded Text to String in Swift. Supports iOS, tvOS, watchOS and macOS.

ISO8859 Convert ISO8859 1-16 Encoded Text to String in Swift. Usage let encoding = ISO8859.part1 let string = String([...], iso8859Encoding: encoding)

Devran Cosmo Uenal 18 Jan 2, 2023
A Cross-Platform String and Regular Expression Library written in Swift.

Guitar ?? A Cross-Platform String and Regular Expression Library written in Swift. About This library seeks to add common string manipulation function

Arthur Ariel Sabintsev 659 Dec 27, 2022
CodeMirror-Swift is a lightweight wrapper of CodeMirror for macOS and iOS

CodeMirror-Swift is a lightweight wrapper of CodeMirror for macOS and iOS. Features ?? Lightweight CodeMirror wrapper (build 5.52.2) โœ… 100% Native Swi

Proxyman 86 Dec 30, 2022
Easiest way to create an attributed UITextView (with support for multiple links and from html)

AttributedTextView Easiest way to create an attributed UITextView (with support for multiple links and html). See the demo app and the playground for

Edwin Vermeer 430 Nov 24, 2022
MarkdownView is a WKWebView based UI element, and internally use bootstrap, highlight.js, markdown-it.

MarkdownView is a WKWebView based UI element, and internally use bootstrap, highlight.js, markdown-it.

Keita Oouchi 1.8k Dec 21, 2022
An easy way to add mentions to uitextview like Facebook and Instagram

OEMentions An easy way to add mentions to uitextview like Facebook and Instagram. It also include a tableview to show the users list to choose from. T

Omar Alessa 48 Oct 23, 2022