From b7b4febe3f55519a4a032e02443534a22e6c2e77 Mon Sep 17 00:00:00 2001 From: Salakar Date: Sat, 27 May 2017 15:24:51 +0100 Subject: [PATCH] [ios][admob] added stub modules --- ios/RNFirebase/RNFirebaseAdMob.h | 12 ++++++++++++ ios/RNFirebase/RNFirebaseAdMob.m | 7 +++++++ lib/modules/admob/index.js | 6 ++++++ tests/src/main.js | 12 ++++++------ 4 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 ios/RNFirebase/RNFirebaseAdMob.h create mode 100644 ios/RNFirebase/RNFirebaseAdMob.m diff --git a/ios/RNFirebase/RNFirebaseAdMob.h b/ios/RNFirebase/RNFirebaseAdMob.h new file mode 100644 index 00000000..bf5b4092 --- /dev/null +++ b/ios/RNFirebase/RNFirebaseAdMob.h @@ -0,0 +1,12 @@ +#ifndef RNFirebaseAdMob_h +#define RNFirebaseAdmob_h + +#import + +@interface RNFirebaseAdMob : NSObject { + +} + +@end + +#endif diff --git a/ios/RNFirebase/RNFirebaseAdMob.m b/ios/RNFirebase/RNFirebaseAdMob.m new file mode 100644 index 00000000..c8a691e1 --- /dev/null +++ b/ios/RNFirebase/RNFirebaseAdMob.m @@ -0,0 +1,7 @@ +#import "RNFirebaseAdMob.h" + +@implementation RNFirebaseAdMob +RCT_EXPORT_MODULE(); +RCT_EXPORT_METHOD(nativeSDKMissing) {} +@end + diff --git a/lib/modules/admob/index.js b/lib/modules/admob/index.js index 2020eea1..9490689e 100644 --- a/lib/modules/admob/index.js +++ b/lib/modules/admob/index.js @@ -1,4 +1,6 @@ import { NativeModules, NativeEventEmitter } from 'react-native'; +import { nativeSDKMissing } from './../../utils'; + import Interstitial from './Interstitial'; import AdRequest from './AdRequest'; import Banner from './Banner'; @@ -11,6 +13,10 @@ export default class Admob extends Base { constructor() { super(); + if (FirebaseAdMob.nativeSDKMissing) { + return nativeSDKMissing('admob'); + } + FirebaseAdMobEvt.addListener('interstitial_event', this._onInterstitialEvent.bind(this)); } diff --git a/tests/src/main.js b/tests/src/main.js index 9d4a06ee..039e3c54 100644 --- a/tests/src/main.js +++ b/tests/src/main.js @@ -52,12 +52,12 @@ function bootstrap() { return null; } - return ; - // return ( - // - // - // - // ); + // return ; + return ( + + + + ); } }