Skip to content

Commit

Permalink
Update FBAudienceNetwork Version (6.11.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrules44 committed May 24, 2022
1 parent 4a4d9c2 commit 1d944bf
Show file tree
Hide file tree
Showing 125 changed files with 4,626 additions and 1,132 deletions.
Binary file modified plugins/2018.3326/iphone-sim/FBAudienceNetwork.framework/FBAudienceNetwork
100755 → 100644
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.

/***
* 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.

/***
* 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;

/**
This method explicitly removes added callbacks. When the instance is deallocated, it is called automatically by SDK
*/
- (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
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.

#import <UIKit/UIKit.h>

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

NS_ASSUME_NONNULL_BEGIN

@class FBAdImage;
@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

/**
Access to the text label contained in this view.
*/
@property (nonatomic, weak, readonly, nullable) UILabel *label;

/**
Determines whether the background mask is shown, or a transparent mask is used.
*/
@property (nonatomic, assign, getter=isBackgroundShown) BOOL backgroundShown;

/**
Determines whether the view can be expanded upon being tapped, or defaults to fullsize. Defaults to NO.
*/
@property (nonatomic, assign, readonly, getter=isExpandable) BOOL expandable;

/**
The native ad that provides AdChoices info, such as the image url, and click url. Setting this property updates the
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. Value of this property is always equal to FBNativeAdViewTagChoicesIcon.
*/
@property (nonatomic, assign, readonly) FBNativeAdViewTag nativeAdViewTag;

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

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

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

/**
This method updates the frame of this view using the superview, positioning the icon in the top right corner by
default.
*/
- (void)updateFrameFromSuperview;

/**
This method updates the frame of this view using the superview, positioning the icon in the corner specified.
UIRectCornerAllCorners not supported.
@param corner The corner to display this view from.
*/
- (void)updateFrameFromSuperview:(UIRectCorner)corner;

/**
This method updates the frame of this view using the superview, positioning the icon in the corner specified with
provided insets. 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

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@class FBDisplayAdController;

@protocol FBAdCompanionViewDelegate;

NS_ASSUME_NONNULL_BEGIN

/**
This class is experimental and should not be used in production versions of your application
*/
@interface FBAdCompanionView : UIView

@property (nonatomic, weak, nullable) id<FBAdCompanionViewDelegate> delegate;

@end

/**
Methods declared by the FBAdCompanionViewDelegate protocol are experimental
and should not be used in production versions of your application
*/
@protocol FBAdCompanionViewDelegate <NSObject>

@optional

/**
This method is experimental and should not be used in production versions of your application
*/
- (void)companionViewDidLoad:(FBAdCompanionView *)companionView;

/**
This method is experimental and should not be used in production versions of your application
*/
- (void)companionViewWillClose:(FBAdCompanionView *)companionView;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.

#ifndef FBAudienceNetwork_FBAdDefines_h
#define FBAudienceNetwork_FBAdDefines_h

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmacro-redefined"

#ifdef __cplusplus
#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")))
#else
#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_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_NSMutableDictionaryOf(x, y) NSMutableDictionary
#define FB_NSSetOf(x) NSSet
#define FB_NSMutableSetOf(x) NSMutableSet
#define __covariant
#endif

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

#ifndef FB_SUBCLASSING_RESTRICTED
#if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted)
#define FB_SUBCLASSING_RESTRICTED __attribute__((objc_subclassing_restricted))
#else
#define FB_SUBCLASSING_RESTRICTED
#endif
#endif

#pragma GCC diagnostic pop

#endif // FBAudienceNetwork_FBAdDefines_h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.

#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 a class used to add configurations to thead experience
*/
@interface FBAdExperienceConfig : NSObject <NSCopying>

/**
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 1d944bf

Please sign in to comment.