Skip to content

Commit

Permalink
SDK v5.5.1
Browse files Browse the repository at this point in the history
* commit '969c2d0fe24f44c75f5b34dce136cfd720fd8832':
  Updated Release Note
  SDKv5.5.1
  Fixed FBAudienceNetwork
  • Loading branch information
asharmaa committed Jul 9, 2019
2 parents 6924733 + 969c2d0 commit f08e360
Show file tree
Hide file tree
Showing 26 changed files with 461 additions and 336 deletions.
2 changes: 1 addition & 1 deletion BinaryProjects/AppNexusNativeSDK/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.5</string>
<string>5.5.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion BinaryProjects/AppNexusSDK/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.5</string>
<string>5.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
3 changes: 1 addition & 2 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## 5.5
## 5.5.1
### New Features
+ MS-3778: Added new API to get Video Orientation for BannerVideo and Video Ads

### Mediation partner upgrades/changes
+ Upgraded Facebook framework to v5.4.0
+ Removed support for following mediation Adaptor
+ AdColony SDK
+ AdMarvel SDK
Expand Down
14 changes: 13 additions & 1 deletion mediation/mediatedviews/Facebook/ANAdAdapterNativeFacebook.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ - (void)requestNativeAdWithServerParameter:(nullable NSString *)parameterString
- (void)registerViewForImpressionTrackingAndClickHandling:(nonnull UIView *)view
withRootViewController:(nonnull UIViewController *)rvc
clickableViews:(nullable NSArray *)clickableViews {
ANLogDebug(@"Not supporting registering views through this API, please get the FBNativeAd object from reponse's native elements and use FB's original API.");
if (clickableViews.count) {
[self.fbNativeAd registerViewForInteraction:view
withViewController:rvc
withClickableViews:clickableViews];
} else {
[self.fbNativeAd registerViewForInteraction:view
withViewController:rvc];
}
}

- (void)dealloc {
Expand Down Expand Up @@ -70,6 +77,11 @@ - (void)nativeAd:(FBNativeAd *)nativeAd didFailWithError:(NSError *)error {
- (void)nativeAdDidLoad:(FBNativeAd *)nativeAd {
ANNativeMediatedAdResponse *response = [[ANNativeMediatedAdResponse alloc] initWithCustomAdapter:self
networkCode:ANNativeAdNetworkCodeFacebook];
response.title = nativeAd.title;
response.body = nativeAd.body;
response.iconImageURL = nativeAd.icon.url;
response.mainImageURL = nativeAd.coverImage.url;
response.callToAction = nativeAd.callToAction;
response.customElements = @{ kANNativeElementObject : nativeAd};

[self.requestDelegate didLoadNativeAd:response];
Expand Down
Binary file modified mediation/mediatedviews/Facebook/FacebookSDK/FBAudienceNetwork.framework/FBAudienceNetwork
100755 → 100644
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
#import <UIKit/UIKit.h>

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

NS_ASSUME_NONNULL_BEGIN

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

/**
Expand All @@ -51,52 +50,42 @@ 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) FBNativeAdBase *nativeAd;
@property (nonatomic, weak, readwrite, nullable) FBNativeAd *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.
@param nativeAd The native ad to initialize with.
- Parameter nativeAd: The native ad to initialize with.
*/
- (instancetype)initWithNativeAd:(FBNativeAdBase *)nativeAd;
- (instancetype)initWithNativeAd:(FBNativeAd *)nativeAd;

/**
Initialize 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 property documentation
- Parameter nativeAd: The native ad to initialize with.
- Parameter expandable: Controls whether view defaults to expanded or not, see property documentation
*/
- (instancetype)initWithNativeAd:(FBNativeAdBase *)nativeAd
- (instancetype)initWithNativeAd:(FBNativeAd *)nativeAd
expandable:(BOOL)expandable;

/**
Initialize 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 property documentation
@param attributes Attributes to configure look and feel.
- 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.
*/
- (instancetype)initWithNativeAd:(FBNativeAdBase *)nativeAd
- (instancetype)initWithNativeAd:(FBNativeAd *)nativeAd
expandable:(BOOL)expandable
attributes:(nullable FBNativeAdViewAttributes *)attributes;

Expand All @@ -108,16 +97,10 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
/**
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.
- 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.
*/
- (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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#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>
Expand All @@ -61,6 +60,18 @@
#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
Expand Up @@ -90,9 +90,7 @@ typedef NS_ENUM(NSInteger, FBAdTestAdType) {
/// carousel ad with square image and app install CTA option
FBAdTestAdType_Carousel_Img_Square_App_Install,
/// carousel ad with square image and link CTA option
FBAdTestAdType_Carousel_Img_Square_Link,
/// carousel ad with square video and link CTA option
FBAdTestAdType_Carousel_Vid_Square_Link
FBAdTestAdType_Carousel_Img_Square_Link
};

@protocol FBAdLoggingDelegate;
Expand Down Expand Up @@ -127,11 +125,6 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
*/
@property (class, nonatomic, copy, readonly) NSString *bidderToken;

/**
Generates routing token needed for requests routing in reverse-proxy, since we don't have cookies in app environments.
*/
@property (class, nonatomic, copy, readonly) NSString *routingToken;

/**
Returns test mode on/off.
*/
Expand All @@ -145,7 +138,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
/**
Adds a test device.
@param deviceHash The id of the device to use test mode, can be obtained from debug log or testDeviceHash
- Parameter deviceHash: The id of the device to use test mode, can be obtained from debug log or testDeviceHash
Expand All @@ -157,7 +150,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
/**
Add a collection of test devices. See `+addTestDevices:` for details.
@param devicesHash The array of the device id to use test mode, can be obtained from debug log or testDeviceHash
- Parameter devicesHash: The array of the device id to use test mode, can be obtained from debug log or testDeviceHash
*/
+ (void)addTestDevices:(FB_NSArrayOf(NSString *)*)devicesHash;

Expand All @@ -169,14 +162,14 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
/**
Clears the added test device
@param deviceHash The id of the device using test mode, can be obtained from debug log or testDeviceHash
- Parameter deviceHash: The id of the device using test mode, can be obtained from debug log or testDeviceHash
*/
+ (void)clearTestDevice:(NSString *)deviceHash;

/**
Configures the ad control for treatment as child-directed.
@param isChildDirected Indicates whether you would like your ad control to be treated as child-directed
- Parameter isChildDirected: Indicates whether you would like your ad control to be treated as child-directed
Note that you may have other legal obligations under the Children's Online Privacy Protection Act (COPPA).
Please review the FTC's guidance and consult with your own legal counsel.
Expand All @@ -186,7 +179,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED
/**
If an ad provided service is mediating Audience Network in their sdk, it is required to set the name of the mediation service
@param service Representing the name of the mediation that is mediation Audience Network
- Parameter service: Representing the name of the mediation that is mediation Audience Network
*/
+ (void)setMediationService:(NSString *)service;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#import <UIKit/UIKit.h>

#import <FBAudienceNetwork/FBAdDefines.h>
#import <FBAudienceNetwork/FBAdExtraHint.h>
#import <FBAudienceNetwork/FBAdSize.h>

NS_ASSUME_NONNULL_BEGIN
Expand All @@ -36,27 +35,14 @@ FB_CLASS_EXPORT
/**
This is a method to initialize an FBAdView matching the given placement id.
@param placementID The id of the ad placement. You can create your placement id from Facebook developers page.
@param adSize The size of the ad; for example, kFBAdSizeHeight50Banner or kFBAdSizeHeight90Banner.
@param rootViewController The view controller that will be used to present the ad and the app store view.
- Parameter placementID: The id of the ad placement. You can create your placement id from Facebook developers page.
- Parameter adSize: The size of the ad; for example, kFBAdSizeHeight50Banner or kFBAdSizeHeight90Banner.
- Parameter viewController: The view controller that will be used to present the ad and the app store view.
*/
- (instancetype)initWithPlacementID:(NSString *)placementID
adSize:(FBAdSize)adSize
rootViewController:(nullable UIViewController *)rootViewController NS_DESIGNATED_INITIALIZER;

/**
This is a method to initialize an FBAdView matching the given placement id with a given bidding payload.
@param placementID The id of the ad placement. You can create your placement id from Facebook developers page.
@param bidPayload The bid payload sent from the server.
@param rootViewController The view controller that will be used to present the ad and the app store view.
@param error An out value that returns any error encountered during init.
*/
- (nullable instancetype)initWithPlacementID:(NSString *)placementID
bidPayload:(NSString *)bidPayload
rootViewController:(nullable UIViewController *)rootViewController
error:(NSError * __autoreleasing *) error;

/**
Begins loading the FBAdView content.
Expand All @@ -73,14 +59,23 @@ FB_CLASS_EXPORT
You can implement `adViewDidLoad:` and `adView:didFailWithError:` methods
of `FBAdViewDelegate` if you would like to be notified as loading succeeds or fails.
@param bidPayload The payload of the ad bid. You can get your bid id from Facebook bidder endpoint.
- Parameter bidPayload: The payload of the ad bid. You can get your bid id from Facebook bidder endpoint.
*/
- (void)loadAdWithBidPayload:(NSString *)bidPayload;

/**
There is no reason to call this method anymore. Autorefresh is disabled by default.
This is a method to disable auto refresh for the FBAdView instance
By default, we read the refresh interval from the placement setting in your Facebook
developers page. Once you call this method, the auto refresh will be disabled for this FBAdView
instance, and you cannot re-enable the refresh for this instance. A new created FBAdView will still
use the default behavior.
This method is designed for ad network mediation. We still recommend you to set the placement
refresh interval as 'None' if you're using one of the ad network mediation.
*/
- (void)disableAutoRefresh FB_DEPRECATED;
- (void)disableAutoRefresh;

/**
Typed access to the id of the ad placement.
Expand All @@ -90,18 +85,10 @@ FB_CLASS_EXPORT
Typed access to the app's root view controller.
*/
@property (nonatomic, weak, readonly, nullable) UIViewController *rootViewController;
/**
Call isAdValid to check whether ad is valid
*/
@property (nonatomic, getter=isAdValid, readonly) BOOL adValid;
/**
the delegate
*/
@property (nonatomic, weak, nullable) id<FBAdViewDelegate> delegate;
/**
FBAdExtraHint to provide extra info
*/
@property (nonatomic, strong, nullable) FBAdExtraHint *extraHint;

@end

Expand All @@ -117,43 +104,43 @@ FB_CLASS_EXPORT
/**
Sent after an ad has been clicked by the person.
@param adView An FBAdView object sending the message.
- Parameter adView: An FBAdView object sending the message.
*/
- (void)adViewDidClick:(FBAdView *)adView;
/**
When an ad is clicked, the modal view will be presented. And when the user finishes the
interaction with the modal view and dismiss it, this message will be sent, returning control
to the application.
@param adView An FBAdView object sending the message.
- Parameter adView: An FBAdView object sending the message.
*/
- (void)adViewDidFinishHandlingClick:(FBAdView *)adView;
/**
Sent when an ad has been successfully loaded.
@param adView An FBAdView object sending the message.
- Parameter adView: An FBAdView object sending the message.
*/
- (void)adViewDidLoad:(FBAdView *)adView;
/**
Sent after an FBAdView fails to load the ad.
@param adView An FBAdView object sending the message.
@param error An error object containing details of the error.
- Parameter adView: An FBAdView object sending the message.
- Parameter error: An error object containing details of the error.
*/
- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error;

/**
Sent immediately before the impression of an FBAdView object will be logged.
@param adView An FBAdView object sending the message.
- Parameter adView: An FBAdView object sending the message.
*/
- (void)adViewWillLogImpression:(FBAdView *)adView;

/**
Asks the delegate for a view controller to present modal content, such as the in-app
browser that can appear when an ad is clicked.
@return A view controller that is used to present modal content.
- Returns: A view controller that is used to present modal content.
*/
@property (nonatomic, readonly, strong) UIViewController *viewControllerForPresentingModalView;

Expand Down
Loading

0 comments on commit f08e360

Please sign in to comment.