[frameworks] [ios] Updated FBAudienceNetwork framework to 4.26.0.

This commit is contained in:
Ilya Grechuhin 2017-10-02 11:41:26 +03:00 committed by Sergey Yershov
parent 1378117154
commit 16fa58427c
14 changed files with 194 additions and 7 deletions

View file

@ -97,12 +97,27 @@ typedef NS_ENUM(NSInteger, FBAdTestAdType) {
FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
@interface FBAdSettings : NSObject
// When test mode is on, setting a non default value for testAdType will
// request the specified type of ad.
@property (class, nonatomic, assign) FBAdTestAdType testAdType;
/**
Controls support for audio-only video playback when the app is backgrounded. Note that this is only supported
when using FBMediaViewVideoRenderer, and requires corresponding support for background audio to be added to
the app. Default value is NO.
*/
@property (class, nonatomic, assign, getter=isBackgroundVideoPlaybackAllowed) BOOL backgroundVideoPlaybackAllowed;
/**
Returns test mode on/off.
When test mode is on, setting a non default value for testAdType will
requests the specified type of ad.
*/
@property (class, nonatomic, assign) FBAdTestAdType testAdType;
/**
Generates bidder token that needs to be included in the server side bid request to Facebook endpoint.
*/
@property (class, nonatomic, copy, readonly) NSString *bidderToken;
/**
Returns test mode on/off.
*/
+ (BOOL)isTestMode;

View file

@ -52,6 +52,17 @@ FB_CLASS_EXPORT
*/
- (void)loadAd;
/**
Begins loading the FBAdView content from a bid payload attained through a server side bid.
You can implement `adViewDidLoad:` and `adView:didFailWithError:` methods
of `FBAdViewDelegate` if you would like to be notified as loading succeeds or fails.
- Parameter bidPayload: The payload of the ad bid. You can get your bid id from Facebook bidder endpoint.
*/
- (void)loadAdWithBidPayload:(NSString *)bidPayload;
/**
This is a method to disable auto refresh for the FBAdView instance

View file

@ -39,4 +39,4 @@
// NOTE: Any changes should also be made to the module.modulemap
// to ensure comptability with Swift apps using Cocoapods
#define FB_AD_SDK_VERSION @"4.23.0"
#define FB_AD_SDK_VERSION @"4.26.0"

View file

@ -0,0 +1,55 @@
// 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 <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol FBInstreamAdRendererViewDelegate;
@interface FBInstreamAdRendererView : UIView
@property (nonatomic, getter=isAdValid, readonly) BOOL adValid;
@property (nonatomic, weak, nullable) id<FBInstreamAdRendererViewDelegate> delegate;
- (void)loadAdFromAdParameters:(nonnull NSString *)adParameters;
- (BOOL)showAdFromRootViewController:(nullable UIViewController *)rootViewController;
@end
@protocol FBInstreamAdRendererViewDelegate <NSObject>
@optional
- (void)adRendererViewDidClick:(nonnull FBInstreamAdRendererView *)adRendererView;
- (void)adRendererViewDidEnd:(nonnull FBInstreamAdRendererView *)adRendererView;
- (void)adRendererViewDidFinishHandlingClick:(nonnull FBInstreamAdRendererView *)adRendererView;
- (void)adRendererViewDidLoad:(nonnull FBInstreamAdRendererView *)adRendererView;
- (void)adRendererView:(nonnull FBInstreamAdRendererView *)adRendererView didFailWithError:(nonnull NSError *)error;
- (void)adRendererViewWillLogImpression:(nonnull FBInstreamAdRendererView *)adRendererView;
@end
NS_ASSUME_NONNULL_END

View file

@ -65,6 +65,17 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
*/
- (void)loadAd;
/**
Begins loading ad content from a bid payload attained through a server side bid.
You can implement `adViewDidLoad:` and `adView:didFailWithError:` methods
of `FBInstreamAdViewDelegate` to be notified when loading succeeds or fails.
- Parameter bidPayload: The payload of the ad bid. You can get your bid id from Facebook bidder endpoint.
*/
- (void)loadAdWithBidPayload:(NSString *)bidPayload;
/**
Begins ad playback. This method should only be called after an `adViewDidLoad:` call
has been received.

View file

@ -66,6 +66,17 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
*/
- (void)loadAd;
/**
Begins loading the FBInterstitialAd content from a bid payload attained through a server side bid.
You can implement `adViewDidLoad:` and `adView:didFailWithError:` methods
of `FBAdViewDelegate` if you would like to be notified as loading succeeds or fails.
- Parameter bidPayload: The payload of the ad bid. You can get your bid id from Facebook bidder endpoint.
*/
- (void)loadAdWithBidPayload:(NSString *)bidPayload;
/**
Presents the interstitial ad modally from the specified view controller.

View file

@ -40,10 +40,15 @@ FB_CLASS_EXPORT
@property (nonatomic, assign, readonly) CMTime currentTime;
/**
The duration of the video, as a CMTime value. Returns kCMTimeInvalid if no video is loaded.
The duration of the video, as a CMTime value. Returns kCMTimeIndefinite if no video is loaded.
*/
@property (nonatomic, assign, readonly) CMTime duration;
/**
Indicates whether the video is currently playing.
*/
@property (nonatomic, assign, readonly, getter=isPlaying) BOOL playing;
/**
The current volume of the video, ranging from 0.0 through 1.0.
*/

View file

@ -37,8 +37,10 @@ typedef NS_OPTIONS(NSInteger, FBNativeAdsCachePolicy) {
FBNativeAdsCachePolicyCoverImage = 1 << 2,
/// Video is cached
FBNativeAdsCachePolicyVideo = 1 << 3,
/// AdChoices icon is cached
FBNativeAdsCachePolicyAdChoices = 1 << 4,
/// All content is cached
FBNativeAdsCachePolicyAll = FBNativeAdsCachePolicyCoverImage | FBNativeAdsCachePolicyIcon | FBNativeAdsCachePolicyVideo,
FBNativeAdsCachePolicyAll = FBNativeAdsCachePolicyCoverImage | FBNativeAdsCachePolicyIcon | FBNativeAdsCachePolicyVideo | FBNativeAdsCachePolicyAdChoices,
};
/**
@ -88,6 +90,19 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
Typed access to the body text, usually a longer description of the ad.
*/
@property (nonatomic, copy, readonly, nullable) NSString *body;
/**
Typed access to the AdChoices icon. See `FBAdImage` for details. See `FBAdChoicesView` for an included implementation.
*/
@property (nonatomic, strong, readonly, nullable) FBAdImage *adChoicesIcon;
/**
Typed access to the AdChoices URL. Navigate to this link when the icon is tapped. See `FBAdChoicesView` for an included implementation.
*/
@property (nonatomic, copy, readonly, nullable) NSURL *adChoicesLinkURL;
/**
Typed access to the AdChoices text, usually a localized version of "AdChoices". See `FBAdChoicesView` for an included implementation.
*/
@property (nonatomic, copy, readonly, nullable) NSString *adChoicesText;
/**
Set the native ad caching policy. This controls which media (images, video, etc) from the native ad are cached before the native ad calls nativeAdLoaded on its delegate. The default is to not block on caching. Ensure that media is loaded through FBMediaView or through [FBAdImage loadImageAsyncWithBlock:] to take full advantage of caching.
*/
@ -144,6 +159,13 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
*/
- (void)loadAd;
/**
Begins loading the FBNativeAd content from a bid payload attained through a server side bid.
- Parameter bidPayload: The payload of the ad bid. You can get your bid payload from Facebook bidder endpoint.
*/
- (void)loadAdWithBidPayload:(nonnull NSString *)bidPayload;
/**
Call isAdValid to check whether native ad is valid & internal consistent prior rendering using its properties. If
rendering is done as part of the loadAd callback, it is guarantee to be consistent

View file

@ -92,6 +92,15 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
*/
- (void)loadAd;
/**
Begins loading the FBRewardedVideoAd content from a bid payload attained through a server side bid.
You can implement `rewardedVideoAdDidLoad:` and `rewardedVideoAd:didFailWithError:` methods
of `FBRewardedVideoAdDelegate` if you would like to be notified as loading succeeds or fails.
*/
- (void)loadAdWithBidPayload:(NSString *)bidPayload;
/**
Presents the rewarded video ad modally from the specified view controller.

View file

@ -0,0 +1,45 @@
framework module FBAudienceNetwork {
umbrella header "FBAudienceNetwork.h"
export *
module * {
export *
}
requires objc, blocks
link framework "AdSupport"
link framework "AudioToolbox"
link framework "AVFoundation"
link framework "CoreGraphics"
link framework "CoreImage"
link framework "CoreMedia"
link framework "CoreMotion"
link framework "Foundation"
link framework "SafariServices"
link framework "Security"
link framework "StoreKit"
link framework "UIKit"
link framework "WebKit"
link framework "VideoToolbox"
link "c++"
link "xml2"
header "FBAdChoicesView.h"
header "FBAdDefines.h"
header "FBAdSettings.h"
header "FBAdView.h"
header "FBInstreamAdView.h"
header "FBInterstitialAd.h"
header "FBMediaView.h"
header "FBNativeAd.h"
header "FBNativeAdScrollView.h"
header "FBNativeAdTableViewAdProvider.h"
header "FBNativeAdTableViewCellProvider.h"
header "FBNativeAdCollectionViewAdProvider.h"
header "FBNativeAdCollectionViewCellProvider.h"
header "FBNativeAdView.h"
header "FBNativeAdsManager.h"
header "FBRewardedVideoAd.h"
}

View file

@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
347D15C11F822BEB00E86251 /* FBAudienceNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34F407691E9E1DA400E57AC0 /* FBAudienceNetwork.framework */; };
34F408E51E9E1DA400E57AC0 /* FacebookBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407611E9E1DA400E57AC0 /* FacebookBannerCustomEvent.m */; };
34F408E61E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407631E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.m */; };
34F408E71E9E1DA400E57AC0 /* FacebookNativeAdAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407651E9E1DA400E57AC0 /* FacebookNativeAdAdapter.m */; };
@ -562,6 +563,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
347D15C11F822BEB00E86251 /* FBAudienceNetwork.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};