Skip to content

nenosinc/SwiftyContacts

Repository files navigation

SwiftyContacts

Language: Swift 5 Version License Platform Swift Package Manager Carthage compatible CocoaPods compatible RxSwift: Supported Read the Docs

A Swift library for Contacts framework.

Requirements

  • iOS 11.0+ / Mac OS X 10.13+ / watchOS 4.0+
  • Xcode 13.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate SwiftyContacts into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'SwiftyContacts'

Then, run the following command:

$ pod install

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but SwiftyContacts does support its use on supported platforms.

Once you have your Swift package set up, adding SwiftyContacts as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/Alamofire/SwiftyContacts.git", .upToNextMajor(from: "4.0.0"))
]

Get started

async-await

let access = try await requestAccess()
let contacts = try await fetchContacts()

closures

requestAccess { result in
    switch result {
    case let .success(bool):
        print(bool)
    case let .failure(error):
        print(error.localizedDescription)
    }
}
fetchContacts { result in
    switch result {
    case let .success(contacts):
        print(contacts)
    case let .failure(error):
        print(error.localizedDescription)
    }
}

Author

Satish Babariya, [email protected]

License

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

About

A Swift library for Contacts framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%