[ios][perf] now detects if pod installed (makes the pod an optional dependency)

This commit is contained in:
Salakar 2017-05-25 15:03:20 +01:00
parent c851e5c083
commit 410f260fc0
1 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#import "RNFirebasePerformance.h"
#import "FirebasePerformance/FIRPerformance.h"
#if __has_include(<FirebasePerformance/FIRPerformance.h>)
#import <FirebasePerformance/FIRPerformance.h>
@implementation RNFirebasePerformance
RCT_EXPORT_MODULE();
@ -45,3 +46,10 @@ RCT_EXPORT_METHOD(incrementCounter:
}
@end
#else
@implementation RNFirebasePerformance
RCT_EXPORT_MODULE();
RCT_EXPORT_METHOD(nativeSDKMissing) {}
@end
#endif