diff --git a/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestore.java b/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestore.java index cf01f262..d89c3093 100644 --- a/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestore.java +++ b/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestore.java @@ -111,18 +111,6 @@ public class RNFirebaseFirestore extends ReactContextBaseJavaModule { }); } - @ReactMethod - public void documentCollections(String appName, String path, final Promise promise) { - RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path); - ref.collections(promise); - } - - @ReactMethod - public void documentCreate(String appName, String path, ReadableMap data, final Promise promise) { - RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path); - ref.create(data, promise); - } - @ReactMethod public void documentDelete(String appName, String path, final Promise promise) { RNFirebaseFirestoreDocumentReference ref = getDocumentForAppPath(appName, path); diff --git a/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestoreDocumentReference.java b/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestoreDocumentReference.java index 156d08e2..93862c99 100644 --- a/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestoreDocumentReference.java +++ b/android/src/main/java/io/invertase/firebase/firestore/RNFirebaseFirestoreDocumentReference.java @@ -40,14 +40,6 @@ public class RNFirebaseFirestoreDocumentReference { this.ref = RNFirebaseFirestore.getFirestoreForApp(appName).document(path); } - public void collections(Promise promise) { - // Not supported on Android - } - - public void create(ReadableMap data, Promise promise) { - // Not supported on Android out of the box - } - public void delete(final Promise promise) { this.ref.delete().addOnCompleteListener(new OnCompleteListener() { @Override diff --git a/ios/RNFirebase/firestore/RNFirebaseFirestore.m b/ios/RNFirebase/firestore/RNFirebaseFirestore.m index 14de1efb..c9510f47 100644 --- a/ios/RNFirebase/firestore/RNFirebaseFirestore.m +++ b/ios/RNFirebase/firestore/RNFirebaseFirestore.m @@ -85,21 +85,6 @@ RCT_EXPORT_METHOD(documentBatch:(NSString *) appName }]; } -RCT_EXPORT_METHOD(documentCollections:(NSString *) appName - path:(NSString *) path - resolver:(RCTPromiseResolveBlock) resolve - rejecter:(RCTPromiseRejectBlock) reject) { - [[self getDocumentForAppPath:appName path:path] get:resolve rejecter:reject]; -} - -RCT_EXPORT_METHOD(documentCreate:(NSString *) appName - path:(NSString *) path - data:(NSDictionary *) data - resolver:(RCTPromiseResolveBlock) resolve - rejecter:(RCTPromiseRejectBlock) reject) { - [[self getDocumentForAppPath:appName path:path] create:data resolver:resolve rejecter:reject]; -} - RCT_EXPORT_METHOD(documentDelete:(NSString *) appName path:(NSString *) path resolver:(RCTPromiseResolveBlock) resolve diff --git a/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.h b/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.h index 98f70b3f..f3178e8c 100644 --- a/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.h +++ b/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.h @@ -17,8 +17,6 @@ @property FIRDocumentReference *ref; - (id)initWithPath:(RCTEventEmitter *)emitter app:(NSString *)app path:(NSString *)path; -- (void)collections:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject; -- (void)create:(NSDictionary *)data resolver:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject; - (void)delete:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject; - (void)get:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject; + (void)offSnapshot:(NSString *)listenerId; diff --git a/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.m b/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.m index 4b1635f2..caa5495f 100644 --- a/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.m +++ b/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.m @@ -23,17 +23,6 @@ static NSMutableDictionary *_listeners; return self; } -- (void)collections:(RCTPromiseResolveBlock) resolve - rejecter:(RCTPromiseRejectBlock) reject { - // Not supported on iOS -} - -- (void)create:(NSDictionary *) data - resolver:(RCTPromiseResolveBlock) resolve - rejecter:(RCTPromiseRejectBlock) reject { - // Not supported on iOS out of the box -} - - (void)delete:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject { [_ref deleteDocumentWithCompletion:^(NSError * _Nullable error) { @@ -176,7 +165,7 @@ static NSMutableDictionary *_listeners; NSDictionary *typeMap = [RNFirebaseFirestoreDocumentReference buildTypeMap:obj]; map[key] = typeMap; }]; - + return map; } @@ -186,7 +175,7 @@ static NSMutableDictionary *_listeners; NSDictionary *typeMap = [RNFirebaseFirestoreDocumentReference buildTypeMap:obj]; [array addObject:typeMap]; }]; - + return array; } @@ -231,7 +220,7 @@ static NSMutableDictionary *_listeners; // TODO: Log an error typeMap[@"type"] = @"null"; } - + return typeMap; }