Skip to content

Releases: bitkey-oss/sharing-firestore

0.4.0

26 Nov 08:05
af68593

Choose a tag to compare

What's Changed

Full Changelog: 0.3.0...0.4.0

0.3.0

06 Nov 12:42
b3c17d5

Choose a tag to compare

What's Changed

  • migrate: replace document reference, swiftpackageindex -> deepwiki. by @arasan01 in #2
  • Integrate auth by @arasan01 in #3

Full Changelog: 0.2.0...0.3.0

0.2.0

08 Apr 07:57
d37c655

Choose a tag to compare

SharingFirestore v0.2.0 Release Notes

Key Features

  • supporting "orFilter", "andFilter", "isNotEqualTo"
  • Improve internal hashability

0.1.0

28 Mar 05:44
e86d0bc

Choose a tag to compare

SharingFirestore v0.1.0 Release Notes 🎉

🚀 Release

SharingFirestore is a lightweight wrapper that integrates Firebase Firestore with the Swift Sharing library.

Key Features

  • Seamless Firebase Firestore Integration - Combine Firestore's real-time database capabilities with Sharing's powerful observation functions
  • Natural SwiftUI Integration - Automatically update UI with @SharedReader and @Shared property wrappers
  • Compatible with @Observable Models - Works seamlessly with the latest Swift Observation framework
  • UIKit Support - Available for use in traditional UIKit applications
  • Dynamic Queries - Supports flexible Firestore query construction
  • Both Read-only and Sync Modes - Optimize data access with .query and .sync strategies

Usage

// Initialize Firestore
@main
struct MyApp: App {
  init() {
    prepareDependencies {
      FirebaseApp.configure()
      $0.defaultFirestore = Firestore.firestore()
    }
  }
  // ...
}

// Example usage in SwiftUI
struct FactsView: View {
  @SharedReader(
    .query(
      configuration: .init(
        path: "facts",
        predicates: [.order(by: "count", descending: true)],
        animation: .default
      )
    )
  )
  var facts: IdentifiedArrayOf<Fact>

  var body: some View {
    List {
      ForEach(facts) { fact in
        Text(fact.body)
      }
    }
  }
}

Installation

Add to your project using Swift Package Manager:

dependencies: [
  .package(url: "https://github.com/bitkey-oss/sharing-firestore", from: "0.1.0")
]

Documentation

Comprehensive documentation is available at Swift Package Index.

Acknowledgements

This project was inspired by SharingGRDB. We'd like to thank the pointfreeco team for creating such excellent libraries.

Full Changelog: https://github.com/bitkey-oss/sharing-firestore/commits/0.1.0