A Swift library for Contacts framework.
- iOS 15+ / Mac OS X 12+
- Xcode 14.0+
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/nenosllc/SwiftyContacts.git", .upToNextMajor(from: "2.0.0"))
]
More documentation can be found by downloading the project and building the Xcode DocC documentation from Xcode.
let access = try await requestAccess()
let status = authorizationStatus()
print(status == CNAuthorizationStatus.authorized)
let contacts = try await fetchContacts()
SwiftyContacts is available under the MIT license. See the LICENSE file for more info.