Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 55dede4

Browse files
Ship 3.6.2
1 parent 314a771 commit 55dede4

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
<img src="docs/images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
22

3+
## 3.6.2 (2016, September 15)
4+
5+
[Full changelog](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/compare/3.6.1...3.6.2)
6+
7+
### SDK versions
8+
If version numbers __changed__, clean your platform folders to avoid build errors.
9+
10+
- iOS: 3.5.x
11+
- Android: 9.4.0
12+
13+
### New
14+
- [#126](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/126) When `singleEvent` is `true` return data in the promise
15+
- [#129](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/129) Ability to remove listeners
16+
17+
### Fixes
18+
- [#128](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/128) On Android `logEvent` may cause an exception
19+
20+
21+
322
## 3.6.1 (2016, September 7)
423

524
[Full changelog](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/compare/3.5.4...3.6.1)

docs/DATABASE.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,13 @@ The plugin will take care of serializing native data structures to JSON data.
146146
};
147147

148148
// listen to changes in the /users path
149-
firebase.addChildEventListener(onChildEvent, "/users");
149+
firebase.addChildEventListener(onChildEvent, "/users").then(
150+
function(listenerWrapper) {
151+
var path = listenerWrapper.path;
152+
var listeners = listenerWrapper.listeners; // an Array of listeners added
153+
// you can store the wrapper somewhere to later call 'removeEventListeners'
154+
}
155+
);
150156
```
151157

152158
### addValueEventListener
@@ -161,7 +167,30 @@ The link is for the iOS SDK, but it's the same for Android.
161167
};
162168

163169
// listen to changes in the /companies path
164-
firebase.addValueEventListener(onValueEvent, "/companies");
170+
firebase.addValueEventListener(onValueEvent, "/companies").then(
171+
function(listenerWrapper) {
172+
var path = listenerWrapper.path;
173+
var listeners = listenerWrapper.listeners; // an Array of listeners added
174+
// you can store the wrapper somewhere to later call 'removeEventListeners'
175+
}
176+
);
177+
```
178+
179+
export function removeEventListeners(listeners: Array<any>, path: string): Promise<any>;
180+
181+
### removeEventListeners
182+
Firebase does not automatically remove listeners when fi. a user logs out.
183+
So please keep track of these listeners yourself and remove them when appropriate.
184+
185+
You can see an example of this in the [demo app](https://github.com/EddyVerbruggen/nativescript-plugin-firebase-demo/blob/master/Firebase/app/main-view-model.js).
186+
187+
> Note that there was a bug in the Android runtime that was fixed in NativeScript 2.3.0 which caused a crash when using this function.
188+
189+
```js
190+
firebase.removeEventListeners(
191+
listeners, // an Array of listeners
192+
"/users" // the path the listener was previously listening to
193+
);
165194
```
166195

167196
### remove

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-plugin-firebase",
3-
"version": "3.6.2-dev",
3+
"version": "3.6.2",
44
"description" : "Fire. Base. Firebase!",
55
"main" : "firebase.js",
66
"nativescript": {

0 commit comments

Comments
 (0)