Commit Graph

23 Commits

Author SHA1 Message Date
Salakar d1783152dc [ios][storage] fix #739 2018-07-14 23:34:57 +01:00
Salakar 5ad351b279 [storage][ios] misc 2018-07-09 17:46:14 +01:00
Salakar c13c81f36d [storage][ios] fix automatic mime/content type detection for storage meta 2018-07-07 03:10:35 +01:00
Evan Bacon cca3c13d2d Fixed Deadlock
Running this in a detached expo app can sometimes deadlock from thread issues.
I've replaced `dispatch_sync(dispatch_get_main_queue(), ^{});`  with `RCTUnsafeExecuteOnMainQueueSync(^{});` to fix this.

I only hit the error in the `RNFirebaseStorage.m` but it seems like the `RNFirebaseAnalytics.m` and `RNFirebase.m` modules could also have this same issue.

`RCTUnsafeExecuteOnMainQueueSync` checks to see if the method is being executed on the main thread before trying to sync to the main thread. If you try to sync on the main thread whilst on the main thread, you hit a deadlock.

You can read more about it here: https://stackoverflow.com/questions/12379059/why-is-this-dispatch-sync-call-freezing?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

The only testing I did was in a seperate detached ExpoKit project. Running this function would cause the crash.
```js
await firebase
      .storage()
      .ref(uploadUri)
      .putFile(uri);
```
2018-06-08 14:44:48 -07:00
Chris Bianca 42e7fb2e5d [ios] Firebase iOS v5 support 2018-05-16 17:22:47 +01:00
Chris Bianca fa9bac1a72 [ios] Set separate dispatch queues for firestore and database 2018-05-15 10:02:18 +01:00
Jose Pablo Rocha, Jr 6d31320686
Set NSNumber to nonnull for storage config calls
Made change requested by Chris Bianca via Discord chat. New versions of react-native requires that all NSNumber arguments are explicitly marked as `nonnull` to ensure compatibility with Android.

Only changed for a few storage methods. The other method exports with NSNumber will probably need to be updated as well, but I did not have a project setup to test them.
2018-01-07 15:09:40 -06:00
Chris Bianca 0fe2fec819 [internals] More tidy up and hiding of internal functions 2018-01-03 20:00:38 +00:00
Chris Bianca 2b2f3ce594 [ios] Centralise event sending to ensure all events validate bridge present before sending 2017-10-26 11:55:07 +01:00
Chris Bianca 114e3b2b5b [ios] Explicitly set requiresMainQueueSetup to prevent warnings on app start 2017-10-12 09:18:01 +01:00
Chris Bianca b432a147b8 [storage][ios] Convert HEI images to JPEG before upload 2017-09-29 15:50:16 +01:00
salakar f6928634f2 [android][ios][storage] UploadTaskSnapshot `downloadUrl` renamed to download `downloadURL` to match web sdk. fixes #379 2017-09-07 03:02:31 +01:00
Chris Bianca ef3bc33914 [ios][storage] Correctly set the mime type of the image or video being uploaded 2017-08-25 18:05:50 +01:00
Chris Bianca ec6d91b6e8 [ios][storage] Multi-app support for iOS storage 2017-08-25 16:18:42 +01:00
Chris Bianca bb98c4f9e5 [ios] Change all library imports to use <> notation 2017-08-17 17:26:20 +01:00
Salakar e3f0213aaa [ios] fixed xcode derp where it imported full path to AppleTV OS version of Foundation.h - random 2017-08-15 13:28:50 +01:00
Salakar 590cb58d49 [storage][ios] fixed customMetadata not being uploaded via putFile - fixes #276 2017-08-14 13:51:17 +01:00
Salakar ac258681bc Merge branch 'master' of https://github.com/invertase/react-native-firebase into v3
# Conflicts:
#	ios/RNFirebase/admob/RNFirebaseAdMob.m
#	ios/RNFirebase/database/RNFirebaseDatabase.h
#	ios/RNFirebase/database/RNFirebaseDatabaseReference.m
#	lib/modules/admob/index.js
#	tests/ios/Podfile.lock
2017-08-11 17:37:12 +01:00
Chris Bianca 97cc5ee131 [ios] Fix conditional imports 2017-08-11 16:07:39 +01:00
Salakar 282f953f52 [both] continued work on multi app support - storage now full supported and auth WIP 2017-07-12 15:49:33 +01:00
nico 1f61933d65 removed newline 2017-06-29 18:27:47 +02:00
nico d77dd094db fixed ios custom metaData 2017-06-29 18:12:57 +02:00
Chris Bianca 4a7a7574db [ios] Break modules into subfolders 2017-06-16 11:15:42 +01:00