Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 837 Bytes

README.md

File metadata and controls

34 lines (26 loc) · 837 Bytes

vCardKit for Swift

Linux macOS

A lightweight vCard (RFC 6350, .vcf) encoder for Swift.

Example

import Foundation
import VCardKit

let card = VCard(
    fn: [.just("John Doe")],
    n: VCardName(
        surname: "Doe",
        given: "John"
    ),
    nickname: [.home("Joe")],
    gender: .male,
    tel: [
        .work(.voice("+31987654321")),
        .home(.text("+31123456789"))
    ],
    email: [.home("[email protected]")]
)

print(card.vEncoded)

// TODO

Hint: Run swift run --repl to run an interactive Swift shell with access to the library