mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-26 13:34:52 +08:00
Merge branch 'master' of https://github.com/invertase/react-native-firebase
This commit is contained in:
@@ -35,7 +35,7 @@ RCT_EXPORT_METHOD(initialize:
|
||||
RCT_EXPORT_METHOD(openDebugMenu:
|
||||
(NSString *) appId) {
|
||||
GADDebugOptionsViewController *debugOptionsViewController = [GADDebugOptionsViewController debugOptionsViewControllerWithAdUnitID:appId];
|
||||
UIWindow* window = [UIApplication sharedApplication].keyWindow;
|
||||
UIWindow *window = [UIApplication sharedApplication].keyWindow;
|
||||
|
||||
[[window rootViewController] presentViewController:debugOptionsViewController animated:YES completion:nil];
|
||||
}
|
||||
@@ -68,6 +68,11 @@ RCT_EXPORT_METHOD(rewardedVideoShowAd:
|
||||
[rewardedVideo show];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(clearInterstitial:
|
||||
(NSString *) adUnit) {
|
||||
if (_interstitials[adUnit]) [_interstitials removeObjectForKey:adUnit];
|
||||
}
|
||||
|
||||
- (RNFirebaseAdMobInterstitial *)getOrCreateInterstitial:(NSString *)adUnit {
|
||||
if (_interstitials[adUnit]) {
|
||||
return _interstitials[adUnit];
|
||||
@@ -187,8 +192,8 @@ RCT_EXPORT_METHOD(rewardedVideoShowAd:
|
||||
NSString *matchText = [value substringWithRange:[match range]];
|
||||
if (matchText) {
|
||||
NSArray *values = [matchText componentsSeparatedByString:@"x"];
|
||||
CGFloat width = (CGFloat)[values[0] intValue];
|
||||
CGFloat height = (CGFloat)[values[1] intValue];
|
||||
CGFloat width = (CGFloat) [values[0] intValue];
|
||||
CGFloat height = (CGFloat) [values[1] intValue];
|
||||
return GADAdSizeFromCGSize(CGSizeMake(width, height));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user