AD
Launch on Firsto—Launch your project today — get a DR57 backlink instantly.
BSkyInfo LogoBskyInfo
All ToolsCategoriesCollectionsFeed DirectoryLabeler DirectoryArticlesGuidesGlossaryBluesky SDKsSponsor
Submit
All ToolsCategoriesCollectionsFeed DirectoryLabeler DirectoryGuidesGlossaryArticlesBluesky SDKsSponsorSubmit
  1. SDKs
  2. /Swift
  3. /swift-cbor
nnabeyang

swift-cbor

A Swift SDK for Bluesky and AT Protocol by nnabeyang

swift-cbor is a library of CBOR encoder & decoder for Swift based on Codable.

GitHub Stats

9stars
1forks
1contributors
0open issues

Dates

Created:May 9, 2024
Last updated:August 21, 2025

README

The following content is from swift-cbor's GitHub repository. All rights reserved by the original author.

swift-cbor

swift-cbor is a library of CBOR encoder & decoder for Swift based on Codable.

Usage

import SwiftCbor

struct Coordinate: Codable {
    let latitude: Double
    let longitude: Double
}

struct Landmark: Codable {
    let name: String
    let foundingYear: Int
    let location: Coordinate
}

let input = Landmark(
    name: "Mojave Desert",
    foundingYear: 0,
    location: Coordinate(
        latitude: 35.0110079,
        longitude: -115.4821313
    )
)
let encoder = CborEncoder()
let decoder = CborDecoder()
let data = try! encoder.encode(input)
let out = try! decoder.decode(Landmark.self, from: data)

print([UInt8](data))
// [163, 100, 110, 97, 109, 101, 109, 77, 111, 106,
//  97, 118, 101, 32, 68, 101, 115, 101, 114, 116,
//  108, 102, 111, 117, 110, 100, 105, 110, 103, 89,
//  101, 97, 114, 0, 104, 108, 111, 99, 97, 116,
//  105, 111, 110, 162, 104, 108, 97, 116, 105, 116,
//  117, 100, 101, 251, 64, 65, 129, 104, 180, 245,
//  63, 179, 105, 108, 111, 110, 103, 105, 116, 117,
//  100, 101, 251, 192, 92, 222, 219, 61, 61, 120,
//  49]

print(out)
// Landmark(
//   name: "Mojave Desert",
//   foundingYear: 0,
//   location: example.Coordinate(
//     latitude: 35.0110079,
//     longitude: -115.4821313
//   )
// )

Installation

SwiftPM

Add the SwiftCbor as a dependency:

let package = Package(
    // name, platforms, products, etc.
    dependencies: [
        // other dependencies
        .package(url: "https://github.com/nnabeyang/swift-cbor", from: "0.0.4"),
    ],
    targets: [
        .executableTarget(name: "<executable-target-name>", dependencies: [
            // other dependencies
                .product(name: "SwiftCbor", package: "swift-cbor"),
        ]),
        // other targets
    ]
)

License

swift-cbor is published under the MIT License, see LICENSE.

Author

Noriaki Watanabe@nnabeyang

Related SDKs

MasterJ93ATProtoKit

A straightforward solution for using the AT Protocol and Bluesky, written in Swift.

197•Swift
DimillianIcySky

A BlueSky Client. TBD.

509•Swift
jcsalteregoSky.app

Sky.app is a great way to use Bluesky Social on MacOS, featuring keyboard shortcuts, Dark Mode Sync, and notification badges.

292•Swift
mattmassicotteATAT

Little library for working with the AT Protocol

9•Swift
kphrxplc-handle-tracker

did:plc & atproto handle tracker

29•Swift
ChimeHQOAuthenticator

OAuth 2.1 request authentication

90•Swift

Resources

GitHub Repository

License

MIT

Author

nnabeyang
nnabeyang
did:plc:bnh3bvyqr3vzxyvjdnrrusbr

Activity

Last commit: August 21, 2025
Commit frequency: Unknown

Our Sponsors

Your Brand Here!

50K+ engaged viewers every month

Limited spots available!

📧 Contact us via email🦋 Contact us on Bluesky
BSkyInfo LogoBskyInfo

The Most Comprehensive Bluesky Tools Directory

Stay updated with the latest Bluesky tools and ecosystem news 🦋

Bluesky butterfly logo
Quick LinksSubmit a ToolSponsorAboutLegal Information
ToolsFeed DirectoryLabeler DirectorySchedulingAnalyticsAll ToolsCategoriesCollectionsTags
ResourcesArticlesBluesky GuidesBluesky GlossaryBluesky SDKsBluesky ResourcesSkyRaffleMeida Coverage
Our ProductsRaffleBlueAiTeach ToolsLaiewAI affiliate listFirstoCoast Fire CalculatorAsphalt CalculatorDog Names World

This website may contain affiliate links

© 2025 BskyInfo. All rights reserved.