Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## Magnite adapter 1.0.0.2 - 2026-09-16

Install: `pod 'CloudXMagniteAdapterV2', '~> 1.0.0.2'`

### Added

- **Magnite Native ads** — Adds standalone Native auction and waterfall support with MagniteSDK 1.0.0. Banner, MREC, Interstitial, and Rewarded support is unchanged. Requires `CloudXCore >= 3.9.0`.

### Fixed

- **Rejected fullscreen shows no longer report a display** — Prevents Interstitial and Rewarded from emitting `didDisplay` after Magnite synchronously rejects the show.

---

## Unity Ads adapter 4.20.1.0 - 2026-09-15

Install: `pod 'CloudXUnityAdsAdapter', '~> 4.20.1.0'`
Expand Down
6 changes: 3 additions & 3 deletions adapter-magnite/CloudXMagniteAdapterV2.podspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Pod::Spec.new do |s|
s.name = 'CloudXMagniteAdapterV2'
s.version = '1.0.0.1'
s.version = '1.0.0.2'
s.summary = 'CloudX Magnite Adapter (independent versioning) - Static Framework'
s.description = 'Magnite adapter for CloudX iOS SDK - binary distribution. Supports Banner, MREC, Interstitial, and Rewarded formats via MagniteSDK. Independent-versioned successor to CloudXMagniteAdapter, which remains on the legacy unified version line.'
s.description = 'Magnite adapter for CloudX iOS SDK - binary distribution. Supports Banner, MREC, Interstitial, Rewarded, and Native formats via MagniteSDK. Independent-versioned successor to CloudXMagniteAdapter, which remains on the legacy unified version line.'
s.homepage = 'https://github.com/cloudx-io/cloudx-ios'
s.license = { :type => 'Business Source License 1.1' }
s.author = { 'CloudX' => 'support@cloudx.io' }
Expand All @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.vendored_frameworks = 'adapter-magnite/CloudXMagniteAdapterV2/CloudXMagniteAdapter.xcframework'

# Dependencies
s.dependency 'CloudXCore', '>= 3.5.0'
s.dependency 'CloudXCore', '>= 3.9.0'
s.dependency 'MagniteSDK', '= 1.0.0'

s.frameworks = ['Foundation', 'UIKit', 'WebKit', 'AVFoundation', 'CoreMedia', 'CoreGraphics', 'CoreTelephony', 'SystemConfiguration', 'StoreKit', 'AdSupport', 'JavaScriptCore', 'QuartzCore', 'CoreFoundation', 'CoreAudio']
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@
<key>BinaryPath</key>
<string>CloudXMagniteAdapter.framework/CloudXMagniteAdapter</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>CloudXMagniteAdapter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>CloudXMagniteAdapter.framework/CloudXMagniteAdapter</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>CloudXMagniteAdapter.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,16 @@
nativePauseRequested = false;
playGuarded(video.play());
},
setMuted: function (muted) {
video.muted = !!muted;
},
/* Introspection for the SDK's device test suite; never creative-reachable (SDK-authored page). */
state: function () {
return JSON.stringify({
t: video.currentTime,
r: video.playbackRate,
p: video.paused,
m: video.muted,
lp: lastPlayhead,
sk: video.seeking,
sl: video.seekable.length
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// CLXMagniteNative.h
// CloudXMagniteAdapter
//

#import <Foundation/Foundation.h>

#import <CloudXCore/CLXAdapterNative.h>
#import <CloudXCore/CLXAdapterLogger.h>

NS_ASSUME_NONNULL_BEGIN

/**
* Magnite native adapter implementing the CloudX CLXAdapterNative contract.
* Manages the lifecycle of a Magnite native ad load, including impression/click
* fan-out and view-registration cleanup.
*/
@interface CLXMagniteNative : CLXAdapterNative

/**
* Magnite placement ID for this ad.
*/
@property (nonatomic, copy, readonly, nullable) NSString *placementID;

/**
* CloudX ad unit name for error messages and logging.
*/
@property (nonatomic, copy, readonly, nullable) NSString *adUnitName;

/// Whether the requested native template requires a primary media asset.
@property (nonatomic, assign, readonly) BOOL requiresMainMedia;

/**
* Initializes a new Magnite native adapter.
* @param bidPayload Ad markup from bid response (nil for waterfall, non-nil for bidding)
* @param placementID The Magnite placement ID (nullable - validation deferred to load)
* @param adUnitName The CloudX placement name for error messages (nullable)
* @param localExtraParameters Publisher-supplied local extras (e.g. native video options)
* @param logger The CloudX adapter logger
* @return Initialized native adapter
*/
- (instancetype)initWithBidPayload:(nullable NSString *)bidPayload
placementID:(nullable NSString *)placementID
adUnitName:(nullable NSString *)adUnitName
localExtraParameters:(nullable NSDictionary<NSString *, id> *)localExtraParameters
logger:(id<CLXAdapterLogger>)logger;

- (instancetype)initWithBidPayload:(nullable NSString *)bidPayload
placementID:(nullable NSString *)placementID
adUnitName:(nullable NSString *)adUnitName
localExtraParameters:(nullable NSDictionary<NSString *, id> *)localExtraParameters
requiresMainMedia:(BOOL)requiresMainMedia
logger:(id<CLXAdapterLogger>)logger;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
//
// CLXMagniteNativeAd.h
// CloudXMagniteAdapter
//

#import <UIKit/UIKit.h>
#import <MagniteSDK/Magnite.h>

#import <CloudXCore/CLXNativeAd.h>
#import <CloudXCore/CLXAdapterLogger.h>

NS_ASSUME_NONNULL_BEGIN

/**
* Abstraction over the subset of Magnite's `MGNINativeAdDetails` the adapter consumes.
*
* `MGNINativeAdDetails` ships as a concrete SDK class whose `mediaView`,
* `videoAspectRatio`, and `isVideo` accessors are read-only and populated
* internally by the SDK, so they cannot be stubbed on a real instance in a unit
* test. Depending on this protocol (which `MGNINativeAdDetails` satisfies via
* the category below) lets the adapter be exercised with a deterministic test
* double while keeping the dependency inverted on the abstraction rather than
* the concrete SDK type.
*/
@protocol CLXMagniteNativeAdapting <NSObject>

@property (nonatomic, copy, nullable) NSString *title;
@property (nonatomic, copy, nullable) NSString *description;
@property (nonatomic, copy, nullable) NSString *callToAction;
@property (nonatomic, copy, nullable) NSString *clickToInstall;
@property (nonatomic, copy, nullable) NSNumber *rating;
@property (nonatomic, copy, nullable) NSString *imageUrl;
@property (nonatomic, copy, nullable) NSString *secondaryImageUrl;
@property (nonatomic, copy, nullable) UIImage *imageBitmap;
@property (nonatomic, copy, nullable) UIImage *secondaryImageBitmap;
@property (nonatomic, copy, readonly, nullable) UIImage *policyImage;
@property (nonatomic, copy, readonly, nullable) NSString *eulaUrl;
@property (nonatomic, readonly, nullable) UIView *mediaView;
@property (nonatomic, readonly) CGFloat videoAspectRatio;
@property (nonatomic, readonly) BOOL isVideo;
@property (nonatomic, assign) BOOL videoMuted;

- (void)registerViewForImpression:(UIView *)view andViewsForClick:(NSArray<UIView *> *)clickableViews;
- (void)unregisterViews;

@end

/// `MGNINativeAdDetails` already implements every member of
/// `CLXMagniteNativeAdapting`, so this category only declares the conformance —
/// letting the adapter hold the SDK object behind the protocol without a
/// wrapper.
///
/// The compiler verifies only that `MGNINativeAdDetails` responds to each
/// selector, not that property attributes or return types match. A future
/// `MagniteSDK` bump that changes one of these signatures compiles silently
/// here and can surface as a runtime crash at the call site. Re-validate this
/// protocol against `MGNINativeAdDetails` on every `MagniteSDK` upgrade (see
/// the `DEBUG`-only runtime check in `CLXMagniteNative.m`).
@interface MGNINativeAdDetails (CLXMagniteNativeAdapting) <CLXMagniteNativeAdapting>
@end

/**
* Concrete `CLXNativeAd` wrapping a Magnite native ad details handle.
*
* Registers the rendered container and clickable views for impression/click
* tracking via `registerViewForImpression:andViewsForClick:` in
* `prepareForInteractionClickableViews:withContainer:`. Holds the SDK object
* behind `CLXMagniteNativeAdapting` so it can be unit-tested with a fake.
*/
@interface CLXMagniteNativeAd : CLXNativeAd

@property (nonatomic, strong, nullable) id<CLXMagniteNativeAdapting> magniteNativeAdDetails;

- (instancetype)initWithNativeAdDetails:(id<CLXMagniteNativeAdapting>)nativeAdDetails
localExtraParameters:(nullable NSDictionary<NSString *, id> *)localExtraParameters
logger:(id<CLXAdapterLogger>)logger;

/// Stops Magnite's impression/click tracking. Called when the native ad is
/// replaced or destroyed.
- (void)stopTracking;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// CLXMagniteNativeFactory.h
// CloudXMagniteAdapter
//

#import <Foundation/Foundation.h>
#import <CloudXCore/CLXAdapterNativeFactory.h>

NS_ASSUME_NONNULL_BEGIN

@interface CLXMagniteNativeFactory : CLXAdapterNativeFactory
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ __attribute__((visibility("default"))) void CloudXMagniteAdapterRegister(void);
// Public headers - Banner
#import "CLXMagniteAdView.h"
#import "CLXMagniteAdViewFactory.h"

// Public headers - Native
#import "CLXMagniteNative.h"
#import "CLXMagniteNativeAd.h"
#import "CLXMagniteNativeFactory.h"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading