Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/1amageek/firebaseapi
Lightweight Cloud Firestore Client API using googleapis gRPC.
https://github.com/1amageek/firebaseapi
cloudfirestore firebase
Last synced: about 1 month ago
JSON representation
Lightweight Cloud Firestore Client API using googleapis gRPC.
- Host: GitHub
- URL: https://github.com/1amageek/firebaseapi
- Owner: 1amageek
- Created: 2023-05-01T08:14:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-30T05:00:41.000Z (3 months ago)
- Last Synced: 2024-11-24T16:42:49.137Z (2 months ago)
- Topics: cloudfirestore, firebase
- Language: Swift
- Homepage:
- Size: 168 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FirebaseAPI
FirebaseAPI for Swift is a Swift package that provides a simple interface to interact.
This repository includes the [googleapis](https://github.com/googleapis/googleapis) repository as a submodule, which is used to generate the API client code for Firebase.
# Development
To develop this library, you will need a `ServiceAccount.json` file.
Please copy this file to the `FirestoreTests` directory.
## Development Steps
1. Download the service account key from Firebase Console and save it as `ServiceAccount.json`.
2. Copy the `ServiceAccount.json` file to the `FirestoreTests` directory.
3. Open the project in Xcode and select the `FirestoreTests` target.
```Package.swift
.testTarget(
name: "FirestoreTests",
dependencies: ["Firestore"],
resources: [
.copy("ServiceAccount.json")
]),
```## Output latest API
```
mkdir -p Sources/Firestore/Proto
cd googleapi
protoc \
./google/firestore/v1/*.proto \
./google/api/field_behavior.proto \
./google/api/resource.proto \
./google/longrunning/operations.proto \
./google/rpc/status.proto \
./google/type/latlng.proto \
--swift_out=../Sources/FirestoreAPI/Proto \
--grpc-swift_out=../Sources/FirestoreAPI/Proto \
--swift_opt=Visibility=Public \
--grpc-swift_opt=Visibility=Public
```