[ios] add backwards compatibility to RN imports - fixed #80
This commit is contained in:
parent
8b8077cf4d
commit
da556ae8c9
@ -2,9 +2,21 @@
|
||||
#define RNFirebase_h
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RCTBridgeModule.h"
|
||||
#if __has_include(<React/RCTEventDispatcher.h>)
|
||||
#import <React/RCTEventDispatcher.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTEventDispatcher.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTEventEmitter.h>)
|
||||
#import <React/RCTEventEmitter.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTEventEmitter.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTBridgeModule.h>)
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTBridgeModule.h"
|
||||
#endif
|
||||
|
||||
@interface RNFirebase : RCTEventEmitter <RCTBridgeModule> {
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
#ifndef RNFirebaseAnalytics_h
|
||||
#define RNFirebaseAnalytics_h
|
||||
|
||||
#if __has_include(<React/RCTBridgeModule.h>)
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTBridgeModule.h"
|
||||
#endif
|
||||
|
||||
@interface RNFirebaseAnalytics : NSObject <RCTBridgeModule> {
|
||||
|
||||
|
@ -2,8 +2,16 @@
|
||||
#define RNFirebaseAuth_h
|
||||
|
||||
#import "Firebase.h"
|
||||
#if __has_include(<React/RCTEventEmitter.h>)
|
||||
#import <React/RCTEventEmitter.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTEventEmitter.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTBridgeModule.h>)
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTBridgeModule.h"
|
||||
#endif
|
||||
|
||||
@interface RNFirebaseAuth : RCTEventEmitter <RCTBridgeModule> {
|
||||
FIRAuthStateDidChangeListenerHandle authListenerHandle;
|
||||
|
@ -1,7 +1,11 @@
|
||||
#ifndef RNFirebaseCrash_h
|
||||
#define RNFirebaseCrash_h
|
||||
|
||||
#if __has_include(<React/RCTBridgeModule.h>)
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTBridgeModule.h"
|
||||
#endif
|
||||
|
||||
@interface RNFirebaseCrash : NSObject <RCTBridgeModule> {
|
||||
|
||||
|
@ -2,8 +2,16 @@
|
||||
#define RNFirebaseDatabase_h
|
||||
|
||||
#import "Firebase.h"
|
||||
#if __has_include(<React/RCTEventEmitter.h>)
|
||||
#import <React/RCTEventEmitter.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTEventEmitter.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTBridgeModule.h>)
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTBridgeModule.h"
|
||||
#endif
|
||||
|
||||
@interface RNFirebaseDatabase : RCTEventEmitter <RCTBridgeModule> {
|
||||
|
||||
|
@ -1,7 +1,11 @@
|
||||
#ifndef RNFirebaseErrors_h
|
||||
#define RNFirebaseErrors_h
|
||||
|
||||
#if __has_include(<React/RCTBridgeModule.h>)
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTBridgeModule.h"
|
||||
#endif
|
||||
#import "Firebase.h"
|
||||
|
||||
@interface RNFirebaseErrors : NSObject <RCTBridgeModule> {
|
||||
|
@ -5,9 +5,22 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "Firebase.h"
|
||||
|
||||
#if __has_include(<React/RCTEventEmitter.h>)
|
||||
#import <React/RCTEventEmitter.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTEventEmitter.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTBridgeModule.h>)
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTBridgeModule.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTUtils.h>)
|
||||
#import <React/RCTUtils.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTUtils.h"
|
||||
#endif
|
||||
|
||||
@import UserNotifications;
|
||||
|
||||
|
@ -1,8 +1,20 @@
|
||||
#import "RNFirebaseMessaging.h"
|
||||
|
||||
#import <React/RCTConvert.h>
|
||||
#if __has_include(<React/RCTEventDispatcher.h>)
|
||||
#import <React/RCTEventDispatcher.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTEventDispatcher.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTConvert.h>)
|
||||
#import <React/RCTConvert.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTConvert.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTUtils.h>)
|
||||
#import <React/RCTUtils.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTUtils.h"
|
||||
#endif
|
||||
|
||||
@import UserNotifications;
|
||||
#import <FirebaseMessaging/FirebaseMessaging.h>
|
||||
|
@ -2,8 +2,16 @@
|
||||
#define RNFirebaseStorage_h
|
||||
|
||||
#import "Firebase.h"
|
||||
#import "RCTBridgeModule.h"
|
||||
#if __has_include(<React/RCTEventEmitter.h>)
|
||||
#import <React/RCTEventEmitter.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTEventEmitter.h"
|
||||
#endif
|
||||
#if __has_include(<React/RCTBridgeModule.h>)
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#else // Compatibility for RN version < 0.40
|
||||
#import "RCTBridgeModule.h"
|
||||
#endif
|
||||
|
||||
@interface RNFirebaseStorage : RCTEventEmitter <RCTBridgeModule> {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user