Latest 2.0.0
Homepage https://github.com/JettF/JFContactsPicker
License MIT
Platforms ios 9.0, requires ARC
Frameworks Contacts, ContactsUI
Authors ,

JFContactsPicker

A contacts picker component using Apple’s Contacts framework.

Platform
Swift 4.2
CocoaPods Compatible
CI Status
License
Twitter: @JettFDev
Twitter: @AnthonyMDev

This library was originally forked from EPContactsPicker, which is no longer maintained.

Preview

Single SelectionMulti Selection

Installation

CocoaPods

JFContactsPicker is available on CocoaPods. Just add the following to your project Podfile:

pod 'JFContactsPicker', '~> 2.0'

Manual Installation

Just drag and drop the Source folder into your project

Requirements

  • iOS9+
  • Swift 4.2
  • ARC

For manual installation you may need to add these frameworks in your Build Phases:
ContactsUI.framework and Contacts.framework.

Features

JFContacts Picker provides all common functionality and customization features:

[x] Single selection and multi-selection options.
[x] Search Contacts
[x] Configure the contact data to be shown. (Phone Number, Email, Birthday, or Organization)
[x] Section indexes to easily navigate through the contacts.
[x] Shows initials when image is not available.
[x] Contact object to get the properties of the contacts

If you would like additional support for additional customization features, please Create a New Issue.

Initialization

Initialize the picker by passing the delegate, multiselection option, and the secondary data type to be displayed (Phone Number, Email, Birthday, or Organization).

let contactPicker = ContactsPicker(delegate: self, multiSelection:false, subtitleCellType: .email)
let navigationController = UINavigationController(rootViewController: contactPicker)
self.present(navigationController, animated: true, completion: nil)

Delegates

ContactsPicker provides you four delegate methods for responding to the picker’s events.

func contactPicker(_: ContactsPicker, didContactFetchFailed error: NSError)
func contactPickerDidCancel(_: ContactsPicker)
func contactPicker(_: ContactsPicker, didSelectContact contact: Contact)
func contactPicker(_: ContactsPicker, didSelectMultipleContacts contacts: [Contact])

Contact Object

The Contact object provides you the properties of a contact. This contains properties like displayName, initials, firstName, lastName, company, birthday, etc.

License

JFContactsPicker is available under the MIT license. See the LICENSE file for more info.

Contributors

@JettF
@AnthonyMDev

Original Authors
@ipraba
@Sorix

Latest podspec

{
    "name": "JFContactsPicker",
    "module_name": "JFContactsPicker",
    "version": "2.0.0",
    "summary": "A contacts picker component for iOS written in swift using new contacts framwork. Forked from 'EPContactsPicker'.",
    "description": "Featuresn[x] Single selection and multi-selection options.n[x] Search Contactsn[x] Configure the contact data to be shown. (Phone Number, Email, Birthday, or Organization)n[x] Section indexes to easily navigate through the contacts.n[x] Shows initials when image is not available.n[x] Contact object to get the properties of the contacts",
    "homepage": "https://github.com/JettF/JFContactsPicker",
    "license": "MIT",
    "authors": {
        "Jett Farmer": "[email protected]",
        "Anthony Miller": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jettf/JFContactsPicker.git",
        "tag": "2.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "frameworks": [
        "Contacts",
        "ContactsUI"
    ],
    "source_files": "Source",
    "resource_bundles": {
        "JFContactsPicker": [
            "Assets/*.xib"
        ]
    }
}

Pin It on Pinterest

Share This