Skip to content

Commit

Permalink
Merge pull request #98 from vikas-goyal-axway/MOD-2646
Browse files Browse the repository at this point in the history
fix(ios): updated admob sdk to 7.61.0
  • Loading branch information
vikas-goyal-axway authored Jun 25, 2020
2 parents 203916d + d51842e commit 36f593d
Show file tree
Hide file tree
Showing 187 changed files with 6,801 additions and 1,429 deletions.
2 changes: 1 addition & 1 deletion ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 2.5.0
version: 2.5.1
architectures: armv7 i386 x86_64 arm64
description: AdMob module for ad delivery via AdMob
author: Jeff Haynie, Stephen Tramer, Jasper Kennis, Jon Alter and Hans Knoechel
Expand Down
Binary file modified ios/platform/FBAudienceNetwork.framework/FBAudienceNetwork
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2004-present Facebook. All Rights Reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/***
* This is a bridge file for Audience Network Unity SDK.
*
* This file may be used to build your own Audience Network iOS SDK wrapper,
* but note that we don't support customisations of the Audience Network codebase.
*
***/

#import <UIKit/UIKit.h>

#import <FBAudienceNetwork/FBAdBridgeContainer.h>
#import <FBAudienceNetwork/FBAdDefines.h>

FB_EXTERN_C_BEGIN

// External to this project
typedef NS_ENUM(NSInteger, FBGLViewController) {
FBGLViewControllerNone,
FBGLViewControllerUnity,
FBGLViewControllerCocos2D,
};

__attribute__((weak)) extern UIViewController *UnityGetGLViewController(void);
__attribute__((__always_inline__)) extern FBGLViewController fbad_Cocos2DGetGLViewController(
UIViewController **glViewController);

__attribute__((__always_inline__)) extern UIViewController *fbad_GetGLViewController(void);
__attribute__((__always_inline__)) extern FBGLViewController fbad_UnityGetGLViewController(
UIViewController **glViewController);

FB_EXTERN_C_END
103 changes: 103 additions & 0 deletions ios/platform/FBAudienceNetwork.framework/Headers/FBAdBridgeContainer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// Copyright 2004-present Facebook. All Rights Reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/***
* This is a bridge file for Audience Network Unity SDK.
*
* This file may be used to build your own Audience Network iOS SDK wrapper,
* but note that we don't support customisations of the Audience Network codebase.
*
***/

#import <Foundation/Foundation.h>

#import <FBAudienceNetwork/FBAdBridgeCommon.h>
#import <FBAudienceNetwork/FBAdView.h>
#import <FBAudienceNetwork/FBInterstitialAd.h>
#import <FBAudienceNetwork/FBRewardedVideoAd.h>

typedef void (*FBAdBridgeCallback)(uint32_t uniqueId);
typedef void (*FBAdBridgeErrorCallback)(uint32_t uniqueId, char const *error);

@interface FBAdBridgeContainer : NSObject

@property (nonatomic, assign) int32_t uniqueId;

// Explicitly remove callbacks
- (void)dispose;

@end

@interface FBAdViewBridgeContainer : FBAdBridgeContainer <FBAdViewDelegate>

@property (nonatomic, strong) FBAdView *adView;

@property (nonatomic, assign) FBAdBridgeCallback adViewDidClickCallback;
@property (nonatomic, assign) FBAdBridgeCallback adViewDidFinishHandlingClickCallback;
@property (nonatomic, assign) FBAdBridgeCallback adViewDidLoadCallback;
@property (nonatomic, assign) FBAdBridgeErrorCallback adViewDidFailWithErrorCallback;
@property (nonatomic, assign) FBAdBridgeCallback adViewWillLogImpressionCallback;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

- (instancetype)initWithAdView:(FBAdView *)adView withUniqueId:(int32_t)uniqueId NS_DESIGNATED_INITIALIZER;

@end

@interface FBInterstitialAdBridgeContainer : FBAdBridgeContainer <FBInterstitialAdDelegate>

@property (nonatomic, strong) FBInterstitialAd *interstitialAd;

@property (nonatomic, assign) FBAdBridgeCallback interstitialAdDidClickCallback;
@property (nonatomic, assign) FBAdBridgeCallback interstitialAdDidCloseCallback;
@property (nonatomic, assign) FBAdBridgeCallback interstitialAdWillCloseCallback;
@property (nonatomic, assign) FBAdBridgeCallback interstitialAdDidLoadCallback;
@property (nonatomic, assign) FBAdBridgeErrorCallback interstitialAdDidFailWithErrorCallback;
@property (nonatomic, assign) FBAdBridgeCallback interstitialAdWillLogImpressionCallback;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

- (instancetype)initWithInterstitialAd:(FBInterstitialAd *)interstitialAd
withUniqueId:(int32_t)uniqueId NS_DESIGNATED_INITIALIZER;

@end

@interface FBRewardedVideoAdBridgeContainer : FBAdBridgeContainer <FBRewardedVideoAdDelegate>

@property (nonatomic, strong) FBRewardedVideoAd *rewardedVideoAd;

@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdDidClickCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdDidCloseCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdWillCloseCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdDidLoadCallback;
@property (nonatomic, assign) FBAdBridgeErrorCallback rewardedVideoAdDidFailWithErrorCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdWillLogImpressionCallback;

@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdVideoCompleteCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdServerRewardDidSucceedCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdServerRewardDidFailCallback;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

- (instancetype)initWithRewardedVideoAd:(FBRewardedVideoAd *)rewardedVideoAd
withUniqueId:(int32_t)uniqueId NS_DESIGNATED_INITIALIZER;

@end
51 changes: 34 additions & 17 deletions ios/platform/FBAudienceNetwork.framework/Headers/FBAdChoicesView.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
#import <UIKit/UIKit.h>

#import <FBAudienceNetwork/FBAdDefines.h>
#import <FBAudienceNetwork/UIView+FBNativeAdViewTag.h>

NS_ASSUME_NONNULL_BEGIN

@class FBAdImage;
@class FBNativeAd;
@class FBNativeAdBase;
@class FBNativeAdViewAttributes;

/**
FBAdChoicesView offers a simple way to display a sponsored or AdChoices icon.
*/
FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
@interface FBAdChoicesView : UIView
FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED @interface FBAdChoicesView : UIView

/**
Access to the text label contained in this view.
Expand All @@ -50,42 +50,51 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
/**
The native ad that provides AdChoices info, such as the image url, and click url. Setting this updates the nativeAd.
*/
@property (nonatomic, weak, readwrite, nullable) FBNativeAd *nativeAd;
@property (nonatomic, weak, readwrite, nullable) FBNativeAdBase *nativeAd;

/**
Affects background mask rendering. Setting this property updates the rendering.
*/
@property (nonatomic, assign, readwrite) UIRectCorner corner;

/**
Affects background mask rendering. Setting this property updates the rendering.
*/
@property (nonatomic, assign, readwrite) UIEdgeInsets insets;

/**
The view controller to present the ad choices info from. If nil, the top view controller is used.
*/
@property (nonatomic, weak, readwrite, null_resettable) UIViewController *rootViewController;

/**
The tag for AdChoices view. It always returns FBNativeAdViewTagChoicesIcon.
*/
@property (nonatomic, assign, readonly) FBNativeAdViewTag nativeAdViewTag;

/**
Initialize this view with a given native ad. Configuration is pulled from the native ad.
- Parameter nativeAd: The native ad to initialize with.
@param nativeAd The native ad to initialize with.
*/
- (instancetype)initWithNativeAd:(FBNativeAd *)nativeAd;
- (instancetype)initWithNativeAd:(FBNativeAdBase *)nativeAd;

/**
Initialize this view with a given native ad. Configuration is pulled from the native ad.
- Parameter nativeAd: The native ad to initialize with.
- Parameter expandable: Controls whether view defaults to expanded or not, see property documentation
@param nativeAd The native ad to initialize with.
@param expandable Controls whether view defaults to expanded or not, see property documentation
*/
- (instancetype)initWithNativeAd:(FBNativeAd *)nativeAd
expandable:(BOOL)expandable;
- (instancetype)initWithNativeAd:(FBNativeAdBase *)nativeAd expandable:(BOOL)expandable;

/**
Initialize this view with a given native ad. Configuration is pulled from the native ad.
- Parameter nativeAd: The native ad to initialize with.
- Parameter expandable: Controls whether view defaults to expanded or not, see property documentation
- Parameter attributes: Attributes to configure look and feel.
@param nativeAd The native ad to initialize with.
@param expandable Controls whether view defaults to expanded or not, see property documentation
@param attributes Attributes to configure look and feel.
*/
- (instancetype)initWithNativeAd:(FBNativeAd *)nativeAd
- (instancetype)initWithNativeAd:(FBNativeAdBase *)nativeAd
expandable:(BOOL)expandable
attributes:(nullable FBNativeAdViewAttributes *)attributes;

Expand All @@ -95,12 +104,20 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
- (void)updateFrameFromSuperview;

/**
Using the superview, this updates the frame of this view, positioning the icon in the corner specified. UIRectCornerAllCorners not supported.
Using the superview, this updates the frame of this view, positioning the icon in the corner specified.
UIRectCornerAllCorners not supported.
- Parameter corner: The corner to display this view from.
- Parameter insets: Insets to take into account when positioning the view. Only respective insets are applied to corners.
@param corner The corner to display this view from.
*/
- (void)updateFrameFromSuperview:(UIRectCorner)corner;

/**
Using the superview, this updates the frame of this view, positioning the icon in the corner specified.
UIRectCornerAllCorners not supported.
@param corner The corner to display this view from.
@param insets Insets to take into account when positioning the view. Only respective insets are applied to corners.
*/
- (void)updateFrameFromSuperview:(UIRectCorner)corner insets:(UIEdgeInsets)insets;

@end
Expand Down
27 changes: 8 additions & 19 deletions ios/platform/FBAudienceNetwork.framework/Headers/FBAdDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,58 +20,47 @@
#define FBAudienceNetwork_FBAdDefines_h

#ifdef __cplusplus
#define FB_EXTERN_C_BEGIN extern "C" {
#define FB_EXTERN_C_END }
#define FB_EXTERN_C_BEGIN extern "C" {
#define FB_EXTERN_C_END }
#else
#define FB_EXTERN_C_BEGIN
#define FB_EXTERN_C_END
#endif

#ifdef __cplusplus
# define FB_EXPORT extern "C" __attribute__((visibility("default")))
#define FB_EXPORT extern "C" __attribute__((visibility("default")))
#else
# define FB_EXPORT extern __attribute__((visibility("default")))
#define FB_EXPORT extern __attribute__((visibility("default")))
#endif

#define FB_CLASS_EXPORT __attribute__((visibility("default")))
#define FB_DEPRECATED __attribute__((deprecated))
#define FB_DEPRECATED_WITH_MESSAGE(M) __attribute__((deprecated(M)))

#if __has_feature(objc_generics)
#define FB_NSArrayOf(x) NSArray<x>
#define FB_NSMutableArrayOf(x) NSMutableArray<x>
#define FB_NSDictionaryOf(x,y) NSDictionary<x, y>
#define FB_NSDictionaryOf(x, y) NSDictionary<x, y>
#define FB_NSMutableDictionaryOf(x, y) NSMutableDictionary<x, y>
#define FB_NSSetOf(x) NSSet<x>
#define FB_NSMutableSetOf(x) NSMutableSet<x>
#else
#define FB_NSArrayOf(x) NSArray
#define FB_NSMutableArrayOf(x) NSMutableArray
#define FB_NSDictionaryOf(x,y) NSDictionary
#define FB_NSDictionaryOf(x, y) NSDictionary
#define FB_NSMutableDictionaryOf(x, y) NSMutableDictionary
#define FB_NSSetOf(x) NSSet
#define FB_NSMutableSetOf(x) NSMutableSet
#define __covariant
#endif

#if ! __has_feature(nullability)
#if !__has_feature(nullability)
#define NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_END
#define nullable
#define __nullable
#endif

#ifndef FB_IOS9_SDK_OR_LATER
#define FB_IOS9_SDK_OR_LATER (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0)
#endif

#ifndef FBInterfaceOrientationMask
#if !FB_IOS9_SDK_OR_LATER
#define FBInterfaceOrientationMask NSUInteger
#else
#define FBInterfaceOrientationMask UIInterfaceOrientationMask
#endif // FB_IOS9_SDK_OR_LATER
#endif // FBInterfaceOrientationMask

#ifndef FB_SUBCLASSING_RESTRICTED
#if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted)
#define FB_SUBCLASSING_RESTRICTED __attribute__((objc_subclassing_restricted))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright 2004-present Facebook. All Rights Reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#import <Foundation/Foundation.h>

#import <FBAudienceNetwork/FBAdDefines.h>

NS_ASSUME_NONNULL_BEGIN

typedef NSString *FBAdExperienceType NS_STRING_ENUM;
extern FBAdExperienceType const FBAdExperienceTypeRewarded;
extern FBAdExperienceType const FBAdExperienceTypeInterstitial;
extern FBAdExperienceType const FBAdExperienceTypeRewardedInterstitial;

FB_CLASS_EXPORT
/**
FBAdExperienceConfig is class designed to add some configuration to ad experience
*/
@interface FBAdExperienceConfig : NSObject

/**
Ad experience type to set up
*/
@property (nonatomic, strong, readwrite, nonnull) FBAdExperienceType adExperienceType;

- (instancetype)init NS_UNAVAILABLE;

+ (instancetype)new NS_UNAVAILABLE;

/**
Creates an FBAdExperienceConfig with a specified type of experience
*/
- (instancetype)initWithAdExperienceType:(FBAdExperienceType)adExperienceType NS_DESIGNATED_INITIALIZER;

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 36f593d

Please sign in to comment.