Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit ad41a47

Browse files
committed
- updated macOS-Version-requirement
- formatting + readme-fixes - deleted userFilter from fetch Request
1 parent 23ceca6 commit ad41a47

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

.github/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# FirebaseManager Package
22

33
This repository contains all utility functions that simplify transactions with Firebase products like Cloud Firestore, Cloud Storage or Authentication, wrapped in a Swift Package.
4+
45
It is made by **[SPACE SQUAD](https://www.spacesquad.de)**! We make great software with ♥️ in Berlin.
6+
57
<img src="assets/README-spacesquad_logo_full.png" width="120">
68

79
---
@@ -21,7 +23,7 @@ It is made by **[SPACE SQUAD](https://www.spacesquad.de)**! We make great softwa
2123

2224
## Installation
2325
##### Requirements
24-
- iOS 14.0+ / macOS 10.15
26+
- iOS 14.0+ / macOS 10.14+
2527
- Xcode 13+
2628
- Swift 5+
2729

@@ -89,6 +91,7 @@ FirestoreManager.createDocument(country, reference: FirestoreReference.country)
8991
FirestoreManager.fetchCollection(FirestoreReference.country) { (result: Result<[Country], FirestoreError>) in
9092
switch result {
9193
case .success(let countries):
94+
// Here you can use the fetched countries!
9295
print(countries)
9396
case .failure(let error):
9497
print(error.localizedDescription)

Package.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let package = Package(
77
name: "FirebaseManager",
88
platforms: [
99
.iOS(.v14),
10-
.macOS(.v10_15)
10+
.macOS(.v10_14)
1111
],
1212
products: [
1313
.library(
@@ -17,8 +17,7 @@ let package = Package(
1717
])
1818
],
1919
dependencies: [
20-
.package(url: "https://github.com/firebase/firebase-ios-sdk.git",
21-
.branch("master"))
20+
.package(url: "https://github.com/firebase/firebase-ios-sdk.git", .upToNextMajor(from: "9.0.0"))
2221
],
2322
targets: [
2423
.target(

Sources/FirestoreManager/FirestoreCRUD/Fetch.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ extension FirestoreManager {
1313
Fetch and listen to a collection from Firebase.
1414

1515
- Parameter reference: The collection name
16-
- Parameter userFilter: Filter all objects by the current user's id
1716
- Parameter filters: Dictionary of the filter key and the value
1817
- Parameter orderBy: Key to order objects by
1918
- Parameter descending: Whether orderBy key should descend
2019
- Parameter limit: Limit number of fetched items
2120
*/
2221
public static func fetchCollection<T>(_ reference: ReferenceProtocol,
23-
userFilter: Bool = true,
2422
filters: [String: Any]? = nil,
2523
orderBy: [String]? = nil,
2624
descending: Bool = false,

Sources/StorageManager/FirebaseStorageManager.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ open class FirebaseStorageManager {
2424
}
2525

2626
taskReference.observe(.progress) { snapshot in
27-
guard let progress = snapshot.progress?.fractionCompleted
27+
guard let progress = snapshot.progress?.fractionCompleted else { return }
2828

29-
else { return }
3029
print("File-Upload completed \(progress)%")
3130
}
3231
}.eraseToAnyPublisher()
@@ -48,8 +47,7 @@ open class FirebaseStorageManager {
4847
return
4948
}
5049

51-
guard let url = url
52-
else {
50+
guard let url = url else {
5351
promise(.failure(.download(error: StorageError.urlMissing)))
5452
return
5553
}

0 commit comments

Comments
 (0)