Skip to content

swift-calendar/vcardkit

Repository files navigation

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

About

Lightweight vCard (RFC 6350) encoder for Swift

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages