[ios][storage] getMetaData --> getMetadata renamed

This commit is contained in:
Salakar 2017-03-29 17:48:21 +01:00
parent 86512320f0
commit b012bf22f6
1 changed files with 4 additions and 3 deletions

View File

@ -126,12 +126,12 @@ RCT_EXPORT_METHOD(getDownloadURL: (NSString *) path resolver:(RCTPromiseResolveB
}
/**
getMetaData
getMetadata
@url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#getMetaData
@url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#getMetadata
@param NSString path
*/
RCT_EXPORT_METHOD(getMetaData: (NSString *) path resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
RCT_EXPORT_METHOD(getMetadata: (NSString *) path resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
FIRStorageReference *fileRef = [self getReference:path];
[fileRef metadataWithCompletion:^(FIRStorageMetadata * _Nullable metadata, NSError * _Nullable error) {
@ -203,6 +203,7 @@ RCT_EXPORT_METHOD(downloadFile: (NSString *) path localPath:(NSString *) localPa
[downloadTask observeStatus:FIRStorageTaskStatusFailure handler:^(FIRStorageTaskSnapshot *snapshot) {
// download task failed
// TODO sendJSError event
if (snapshot.error != nil) {
[self promiseRejectStorageException:reject error:snapshot.error];
}