[ios] Remove eventemitter interface when module hasn’t been included

This commit is contained in:
Chris Bianca 2017-05-31 15:53:08 +01:00
parent a162a0d6f5
commit 51f50ca17d
4 changed files with 16 additions and 9 deletions

View File

@ -1,11 +1,11 @@
#ifndef RNFirebaseAuth_h
#define RNFirebaseAuth_h
#import <React/RCTEventEmitter.h>
#import <React/RCTBridgeModule.h>
#if __has_include(<FirebaseAuth/FIRAuth.h>)
#import "Firebase.h"
#import <React/RCTEventEmitter.h>
@interface RNFirebaseAuth : RCTEventEmitter <RCTBridgeModule> {
FIRAuthStateDidChangeListenerHandle authListenerHandle;
@ -15,7 +15,7 @@
@end
#else
@interface RNFirebaseAuth : RCTEventEmitter <RCTBridgeModule> {
@interface RNFirebaseAuth : NSObject <RCTBridgeModule> {
}
@end
#endif

View File

@ -1,19 +1,19 @@
#ifndef RNFirebaseDatabase_h
#define RNFirebaseDatabase_h
#import <React/RCTEventEmitter.h>
#import <React/RCTBridgeModule.h>
#if __has_include(<FirebaseDatabase/FIRDatabase.h>)
#import <React/RCTEventEmitter.h>
@interface RNFirebaseDatabase : RCTEventEmitter <RCTBridgeModule> {}
@interface RNFirebaseDatabase : RCTEventEmitter<RCTBridgeModule> {}
@property NSMutableDictionary *dbReferences;
@property NSMutableDictionary *transactions;
@property dispatch_queue_t transactionQueue;
@end
#else
@interface RNFirebaseDatabase : RCTEventEmitter <RCTBridgeModule> {}
@interface RNFirebaseDatabase : NSObject<RCTBridgeModule> {}
@end
#endif

View File

@ -1,11 +1,11 @@
#ifndef RNFirebaseMessaging_h
#define RNFirebaseMessaging_h
#import <React/RCTEventEmitter.h>
#import <React/RCTBridgeModule.h>
#if __has_include(<FirebaseMessaging/FirebaseMessaging.h>)
#import <FirebaseMessaging/FirebaseMessaging.h>
#import <React/RCTEventEmitter.h>
@import UserNotifications;
@ -26,7 +26,7 @@ typedef void (^RCTNotificationResponseCallback)();
@end
#else
@interface RNFirebaseMessaging : RCTEventEmitter<RCTBridgeModule>
@interface RNFirebaseMessaging : NSObject<RCTBridgeModule>
@end
#endif

View File

@ -1,13 +1,20 @@
#ifndef RNFirebaseStorage_h
#define RNFirebaseStorage_h
#import <React/RCTEventEmitter.h>
#import <React/RCTBridgeModule.h>
@interface RNFirebaseStorage : RCTEventEmitter <RCTBridgeModule> {
#if __has_include(<FirebaseStorage/FIRStorage.h>)
#import <React/RCTEventEmitter.h>
@interface RNFirebaseStorage : RCTEventEmitter<RCTBridgeModule> {
}
@end
#else
@interface RNFirebaseStorage : NSObject<RCTBridgeModule>
@end
#endif
#endif