[ios] Tidy up of iOS imports and other misc clean up

This commit is contained in:
Chris Bianca
2017-05-31 09:54:02 +01:00
parent 6c04c8484a
commit dcd6321561
9 changed files with 18 additions and 66 deletions

View File

@@ -1,36 +1,18 @@
#import "RNFirebase.h"
#import "RNFirebaseEvents.h"
static dispatch_once_t onceToken;
@implementation RNFirebase
RCT_EXPORT_MODULE(RNFirebase);
- (void)dealloc {
NSLog(@"Dealloc called on RNFirebase: %@", self);
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (id)init {
self = [super init];
if (self != nil) {
NSLog(@"Setting up RNFirebase instance");
[RNFirebase initializeRNFirebase];
}
return self;
}
+ (void)initializeRNFirebase {
#if __has_include(<FirebaseMessaging/FirebaseMessaging.h>)
dispatch_once(&onceToken, ^{
[[NSNotificationCenter defaultCenter] postNotificationName:kRNFirebaseInitialized object:nil];
});
#endif
}
- (NSArray<NSString *> *)supportedEvents {
return @[INITIALIZED_EVENT];
return @[];
}
@end
@end