Skip to content

Commit 8fc12c1

Browse files
authored
Merge branch 'v3' into master
2 parents 4994768 + 7de26d3 commit 8fc12c1

24 files changed

+417
-90
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@ We have a working application example available in at [fullstackreact/FirestackA
4444
* [Events](docs/api/events.md)
4545
* [Redux](docs/redux.md)
4646

47+
## Feature overview
48+
Feature | Firestack | Firebase
49+
------------ | ------------- | -------------
50+
Real time database | -- | YES
51+
Authentication | -- | YES
52+
Cloud messaging | -- | YES
53+
Storage | -- | YES
54+
Crash reporting | -- | YES
55+
Notifications | -- | YES
56+
Remote config | -- | YES
57+
Dynamic links | -- | YES
58+
AdMob | -- | YES
59+
Analytics | -- | YES
60+
App indexing | -- | YES
61+
Hosting | -- | YES
62+
AdWords | -- | YES
63+
Invites | -- | YES
64+
4765
## Contributing
4866

4967
For a detailed discussion of how Firestack works as well as how to contribute, check out our [contribution guide](https://github.com/fullstackreact/react-native-firestack/blob/master/Contributing.md).

android/.idea/gradle.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ allprojects {
4444

4545
dependencies {
4646
compile 'com.facebook.react:react-native:0.20.+'
47-
compile 'com.google.android.gms:play-services-base:9.8.0'
48-
compile 'com.google.firebase:firebase-core:9.8.0'
49-
compile 'com.google.firebase:firebase-config:9.8.0'
50-
compile 'com.google.firebase:firebase-auth:9.8.0'
51-
compile 'com.google.firebase:firebase-analytics:9.8.0'
52-
compile 'com.google.firebase:firebase-database:9.8.0'
53-
compile 'com.google.firebase:firebase-storage:9.8.0'
54-
compile 'com.google.firebase:firebase-messaging:9.8.0'
47+
compile 'com.google.android.gms:play-services-base:+'
48+
compile 'com.google.firebase:firebase-core:10.0.1'
49+
compile 'com.google.firebase:firebase-config:10.0.1'
50+
compile 'com.google.firebase:firebase-auth:10.0.1'
51+
compile 'com.google.firebase:firebase-analytics:10.0.1'
52+
compile 'com.google.firebase:firebase-database:10.0.1'
53+
compile 'com.google.firebase:firebase-storage:10.0.1'
54+
compile 'com.google.firebase:firebase-messaging:10.0.1'
5555
}
5656

docs/api/authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Sign in the user with a 3rd party credential provider. `credential` requires the
100100

101101
```javascript
102102
const credential = {
103-
provider: 'facebook.com',
103+
provider: 'facebook',
104104
token: '12345',
105105
secret: '6789',
106106
};

docs/api/database.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,34 @@ firestack.database()
2525
});
2626
```
2727

28+
Test value exists at location:
29+
```javascript
30+
firestack.database()
31+
.ref('posts/1234')
32+
.on('value', (snapshot) => {
33+
const exists = snapshot.exists();
34+
});
35+
```
36+
37+
Basic write with priority example:
38+
```javascript
39+
firestack.database()
40+
.ref('posts/1235')
41+
.setWithPriority({
42+
title: 'Another Awesome Post',
43+
content: 'Some awesome content',
44+
}, 10);
45+
```
46+
Useful for `orderByPriority` queries.
47+
48+
49+
Transaction Support:
50+
```javascript
51+
firestack.database()
52+
.ref('posts/1234/title')
53+
.transaction((title) => 'My Awesome Post');
54+
```
55+
2856
## Unmounted components
2957

3058
Listening to database updates on unmounted components will trigger a warning:

ios/Firestack/Firestack.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#define Firestack_h
99

1010
#import <UIKit/UIKit.h>
11-
#import "RCTBridgeModule.h"
12-
#import "RCTEventDispatcher.h"
13-
#import "RCTEventEmitter.h"
11+
#import <React/RCTBridgeModule.h>
12+
#import <React/RCTEventDispatcher.h>
13+
#import <React/RCTEventEmitter.h>
1414

1515
@interface Firestack : RCTEventEmitter <RCTBridgeModule> {
1616
}

ios/Firestack/Firestack.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ + (void) initializeFirestack:(Firestack *) instance
5353
dispatch_once(&onceToken, ^{
5454
_sharedInstance = instance;
5555

56+
/* RCTReloadNotification is deprecated
5657
[[NSNotificationCenter defaultCenter] addObserver:self
5758
selector:@selector(reloadFirestack)
5859
name:RCTReloadNotification
5960
object:nil];
61+
*/
6062

6163
[[NSNotificationCenter defaultCenter]
6264
postNotificationName:kFirestackInitialized

ios/Firestack/FirestackAnalytics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef FirestackAnalytics_h
1010
#define FirestackAnalytics_h
1111

12-
#import "RCTBridgeModule.h"
12+
#import <React/RCTBridgeModule.h>
1313

1414
@interface FirestackAnalytics : NSObject <RCTBridgeModule> {
1515

ios/Firestack/FirestackAuth.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#define FirestackAuth_h
1111

1212
#import "Firebase.h"
13-
#import "RCTEventEmitter.h"
14-
#import "RCTBridgeModule.h"
13+
#import <React/RCTEventEmitter.h>
14+
#import <React/RCTBridgeModule.h>
1515

1616
@interface FirestackAuth : RCTEventEmitter <RCTBridgeModule> {
1717
FIRAuthStateDidChangeListenerHandle authListenerHandle;

ios/Firestack/FirestackAuth.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ @implementation FirestackAuth
314314
if (error) {
315315
[self userErrorCallback:callback error:error user:user msg:@"getTokenError"];
316316
} else {
317-
[self userCallback:callback user:user];
317+
callback(@[[NSNull null], token]);
318318
}
319319
}];
320320
} else {
@@ -331,7 +331,7 @@ @implementation FirestackAuth
331331
if (error) {
332332
[self userErrorCallback:callback error:error user:user msg:@"getTokenWithCompletion"];
333333
} else {
334-
[self userCallback:callback user:user];
334+
callback(@[[NSNull null], token]);
335335
}
336336
}];
337337
} else {

0 commit comments

Comments
 (0)