Integration
Meta Audience Network adapter for CloudX iOS SDK. Supports Banner, MREC, Interstitial, Rewarded, Native, Native Banner, and Native MREC.
For CloudX dashboard mapping and Meta-side ID setup, see the Meta Audience Network bidder guide. This page covers iOS-specific integration details only.
Installation
CocoaPods
pod 'CloudXMetaAdapter', '~> 6.22.0.0'pod install --repo-updateManual
- Download
CloudXMetaAdapter.xcframework.zipfrom Releases - Unzip and drag
CloudXMetaAdapter.xcframeworkinto your Xcode project - Add
FBAudienceNetwork(= 6.22.0) manually.
Info.plist Configuration
SKAdNetwork IDs (Required for iOS 14.5+)
Both Meta SKAdNetwork IDs are required for Meta to make bids:
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>v9wttpbfk9.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>n38lu8286q.skadnetwork</string>
</dict>
</array>App Tracking Transparency (iOS 14+)
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>Project Configuration
Linker Flags: Add -ObjC to Other Linker Flags in Build Settings.
Bitcode: Meta SDK does not support Bitcode. Set Enable Bitcode to NO.
Native Ads
Impression tracking requirements
Meta requires a specific asset to be rendered and visible on screen before it counts an impression, depending on the Meta placement format:
| Meta placement format | Required asset | Required view |
|---|---|---|
| Native | Media view | FBMediaView |
| Native Banner | App icon | UIImageView |
See Meta’s Native Ads and Native Banner Ads guides for the full asset rendering requirements.
Mapping Meta placements to CloudX ad units
| Meta placement format | CloudX ad unit | CloudX API | Who renders the required asset |
|---|---|---|---|
| Native | Native | createNativeAdLoader(adUnitIdentifier:) | Your layout, via the binder’s media container |
| Native | MREC (300×250) | createMREC(adUnitId:) | CloudX-provided layout |
| Native Banner | Banner (320×50) | createBanner(adUnitId:) | CloudX-provided layout |
For standalone Meta Native ads, bind a visible media container with the view binder’s mediaContentViewTag. CloudX attaches Meta’s FBMediaView to that container. If a Meta Native Banner creative can serve in your Native ad unit, also bind an icon UIImageView with iconImageViewTag — Meta registers Native Banner impressions against the icon view. See Native ads for the complete layout and loading flow.
Native Banner and MREC creatives served through CLXBannerAdView use CloudX-provided layouts, so no native binder is required in publisher code.
Compatibility
| Adapter version | Network SDK | Minimum CloudXCore |
|---|---|---|
6.22.0.0 | Meta Audience Network 6.22.0 | 3.5.0 |
6.21.1.0 | Meta Audience Network 6.21.1 | 3.5.0 |
6.21.0.0 | Meta Audience Network 6.21.0 | 3.5.0 |
The adapter is discovered automatically when your server-provisioned CloudX configuration includes this network’s demand. No manual adapter registration is required.
Known issues
Live issues only. Resolved entries move to the adapter changelog.
Meta SDK 6.21.0 crashes in apps using SceneDelegate
Affected: Meta Audience Network SDK 6.21.0 in apps with the scene-based lifecycle (iOS 13+ SceneDelegate).
Symptom: crash during banner ad display:
*** -[NSProxy doesNotRecognizeSelector:observeScreenOrientationChanges:] called!
This is an internal Meta SDK bug: FBDisplayAdController creates an NSProxy for orientation observation that is not properly configured.
Workaround: use the old-style AppDelegate-only pattern (without SceneDelegate). This is the only reliable fix.
- Delete
SceneDelegate.handSceneDelegate.mfrom your project. - Remove the entire
UIApplicationSceneManifestsection from yourInfo.plist. - Add the required keys to
Info.plist:
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>- Update your
AppDelegate:
// AppDelegate.h
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
// AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.rootViewController = [[YourRootViewController alloc] init];
[self.window makeKeyAndVisible];
return YES;
}class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = YourRootViewController()
window?.makeKeyAndVisible()
return true
}
}After removing SceneDelegate, Xcode logs CLIENT OF UIKIT REQUIRES UPDATE: This process does not adopt UIScene lifecycle. This warning is expected and does not affect functionality.
Support
For support, contact support@cloudx.io