Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FCM implementation #167

Open
wants to merge 37 commits into
base: v3
Choose a base branch
from
Open
Changes from 3 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ed409a2
Implement reauthenticateWithCredentialForProvider for Android
ghuh Nov 8, 2016
972b16d
Catch exception thrown by setPersistenceEnabled which was causing the…
chaitanya-bhagavan Nov 8, 2016
a4a115f
Parity in response format between ios and android
chaitanya-bhagavan Nov 8, 2016
483e15f
Fixed a typo that was causing an error
chaitanya-bhagavan Nov 8, 2016
a85f5fa
Parity in response format between ios and android
chaitanya-bhagavan Nov 9, 2016
e34988b
Reverted changes since it was an error from my end
chaitanya-bhagavan Nov 9, 2016
68396e0
fixing filter value creation
pedro-ribeiro Nov 9, 2016
635f882
Merge pull request #122 from pedro-ribeiro/fixing_equalto
auser Nov 9, 2016
ea5e10c
Merge pull request #119 from chaitanya0bhagvan/master
auser Nov 9, 2016
b55ba69
Merge pull request #117 from ghuh/ghuh-android-reauthenticateWithCred…
auser Nov 9, 2016
c3129fb
Fix Android listenForAuth method to correctly check for user
ghuh Nov 10, 2016
28644a6
WIP: FirebaseAuth
auser Nov 10, 2016
1111617
Added initial handling of android error messages
auser Nov 10, 2016
c811a3a
Merge pull request #124 from ghuh/ghuh-android-listenForAuth
auser Nov 11, 2016
7d09ab4
Parity of response format between ios and android. Added authenticate…
chaitanya-bhagavan Nov 11, 2016
e525569
Remove RCTConvert to work with react-native-fcm
auser Nov 14, 2016
9f9525d
Merge branch 'master' of github.com:fullstackreact/react-native-fires…
auser Nov 14, 2016
ef52467
Merge pull request #126 from chaitanya0bhagvan/master
auser Nov 14, 2016
8306c45
Filter out undefined filters
samer Nov 16, 2016
487ed30
removing trailing comma
pedro-ribeiro Nov 16, 2016
a0a78e5
Merge pull request #137 from pedro-ribeiro/fixing_trailing_comma
auser Nov 16, 2016
da34c79
Merge pull request #136 from samer/filter-fix
auser Nov 16, 2016
6ca78a1
forEach and map method on the DataSnapshot does not retain key
chaitanya-bhagavan Nov 17, 2016
80133de
Fixed error calling length of undefined
chaitanya-bhagavan Nov 17, 2016
0349b61
Merge pull request #139 from chaitanya0bhagvan/master
auser Nov 17, 2016
d005ab2
Use storage url from .plist file if not setStorageUrl() hasn't been c…
janvogt Nov 17, 2016
dfc0bd1
Fix donwloadUrl to use storageUrl from .plist.
janvogt Nov 17, 2016
e214b6d
Merge pull request #143 from janvogt/fix-storage-config
auser Nov 17, 2016
f4bcfea
WIP
auser Nov 18, 2016
29140b6
Merge branch 'master' of github.com:fullstackreact/react-native-fires…
auser Nov 18, 2016
f715d41
Updated with @Salakar v3
auser Nov 18, 2016
7774ac1
Merge pull request #152 from Salakar/master
Salakar Nov 21, 2016
98d873f
Implement firestack.storage.download() for android
BlooJeans Nov 21, 2016
f3233ad
Factor out errorCodes for future constants
BlooJeans Nov 21, 2016
d50e976
Remove unused/old database.js
BlooJeans Nov 21, 2016
f034c1f
Merge pull request #154 from devshackio/android-downloadFile
Salakar Nov 22, 2016
4bb951c
FCM implementation
tretelny416 Nov 26, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions ios/Firestack/FirestackStorage.m
Original file line number Diff line number Diff line change
@@ -25,7 +25,12 @@ - (dispatch_queue_t)methodQueue
path:(NSString *) path
callback:(RCTResponseSenderBlock) callback)
{
FIRStorageReference *storageRef = [[FIRStorage storage] referenceForURL:storageUrl];
FIRStorageReference *storageRef;
if (storageUrl == nil ) {
storageRef = [[FIRStorage storage] reference];
} else {
storageRef = [[FIRStorage storage] referenceForURL:storageUrl];
}
FIRStorageReference *fileRef = [storageRef child:path];
[fileRef downloadURLWithCompletion:^(NSURL * _Nullable URL, NSError * _Nullable error) {
if (error != nil) {
@@ -52,14 +57,13 @@ - (dispatch_queue_t)methodQueue
metadata:(NSDictionary *)metadata
callback:(RCTResponseSenderBlock) callback)
{
FIRStorageReference *storageRef;
if (urlStr == nil) {
NSError *err = [[NSError alloc] init];
[err setValue:@"Storage configuration error" forKey:@"name"];
[err setValue:@"Call setStorageUrl() first" forKey:@"description"];
return callback(@[err]);
storageRef = [[FIRStorage storage] reference];
} else {
storageRef = [[FIRStorage storage] referenceForURL:urlStr];
}

FIRStorageReference *storageRef = [[FIRStorage storage] referenceForURL:urlStr];
FIRStorageReference *uploadRef = [storageRef child:name];
FIRStorageMetadata *firmetadata = [[FIRStorageMetadata alloc] initWithDictionary:metadata];