You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<b>Built and maintained with 🧡 by <ahref="https://git.live">GitLive</a></b><br/>
4
-
<i>Real-time code collaboration inside any IDE</i><br/>
4
+
<i>Development teams merge faster with GitLive</i><br/>
5
5
<br/>
6
6
<br/>
7
-
The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the <ahref="https://firebase.github.io/firebase-android-sdk/reference/kotlin/firebase-ktx/">Firebase Android SDK Kotlin Extensions</a> but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting <strong>iOS</strong>, <strong>Android</strong> or <strong>JS</strong>.
7
+
The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the
Is the Firebase library or API you need missing? [Create an issue](https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/new?labels=API+coverage&template=increase-api-coverage.md&title=Add+%5Bclass+name%5D.%5Bfunction+name%5D+to+%5Blibrary+name%5D+for+%5Bplatform+names%5D) to request additional API coverage or be awesome and [submit a PR](https://github.com/GitLiveApp/firebase-kotlin-sdk/fork)
30
31
@@ -88,6 +89,7 @@ db.collection("cities").document("LA").set(City.serializer(), city, encodeDefaul
88
89
```
89
90
90
91
The `encodeDefaults` parameter is optional and defaults to `true`, set this to false to omit writing optional properties if they are equal to theirs default values.
92
+
Using [@EncodeDefault](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-encode-default/) on properties is a recommended way to locally override the behavior set with `encodeDefaults`.
91
93
92
94
You can also omit the serializer but this is discouraged due to a [current limitation on Kotlin/JS and Kotlin/Native](https://github.com/Kotlin/kotlinx.serialization/issues/1116#issuecomment-704342452)
93
95
@@ -110,6 +112,21 @@ data class Post(
110
112
)
111
113
```
112
114
115
+
In addition `firebase-firestore` provides [GeoPoint] and [DocumentReference] classes which allow persisting
116
+
geo points and document references in a native way:
This sdk will handle polymorphic serialization automatically if you have a sealed class and its children marked as `Serializable`. It will include a `type` property that will be used to discriminate which child class is the serialized.
@@ -189,6 +206,8 @@ In cases where it makes sense, such as Firebase Functions HTTPS Callable, operat
189
206
190
207
The Firebase Kotlin SDK provides a common API to access Firebase for projects targeting *iOS*, *Android* and *JS* meaning you can use Firebase directly in your common code. Under the hood, the SDK achieves this by binding to the respective official Firebase SDK for each supported platform.
191
208
209
+
It uses the <ahref="https://github.com/GitLiveApp/firebase-java-sdk">Firebase Java SDK</a> to support the JVM target.
210
+
192
211
### Accessing the underlying Firebase SDK
193
212
194
213
In some cases you might want to access the underlying official Firebase SDK in platform specific code, for example when the common API is missing the functionality you need. For this purpose each class in the SDK has `android`, `ios` and `js` properties which holds the equivalent object of the underlying official Firebase SDK.
@@ -201,23 +220,10 @@ These properties are only accessible from the equivalent target's source set. Fo
201
220
.build()
202
221
```
203
222
204
-
### NPM modules
205
-
206
-
If you are building a Kotlin multiplatform library which will be consumed from JS code you may need to include the SDK in your `package.json`, you can do it as follows:
207
-
208
-
```json
209
-
"dependencies": {
210
-
"@gitlive/firebase-auth": "1.8.0",
211
-
"@gitlive/firebase-config": "1.8.0",
212
-
"@gitlive/firebase-database": "1.8.0",
213
-
"@gitlive/firebase-firestore": "1.8.0",
214
-
"@gitlive/firebase-functions": "1.8.0",
215
-
"@gitlive/firebase-installations": "1.8.0",
216
-
"@gitlive/firebase-messaging": "1.8.0",
217
-
"@gitlive/firebase-storage": "1.8.0"
218
-
"@gitlive/firebase-perf": "1.8.0"
219
-
"@gitlive/firebase-crashlytics": "1.8.0"
220
-
}
221
-
```
222
-
223
-
223
+
## Contributing
224
+
If you'd like to contribute to this project then you can fork this repository.
225
+
You can build and test the project locally.
226
+
1. Open the project in IntelliJ IDEA.
227
+
2. Install cocoapods via `sudo gem install -n /usr/local/bin cocoapods`
228
+
3. Install the GitLive plugin into IntelliJ
229
+
4. After a gradle sync then run `publishToMavenLocal`
0 commit comments