Mopub Mediation Adapter Configuration
於 2021年5月19日 (三) 11:16 由 imported>Wikiuser 所做的修訂 (新頁面: Mopub SDK v5.5.0+ 都需要實做 adaptor configuration 考參考官網教學 [https://developers.mopub.com/networks/integrate/build-adapters-ios/#quick-start-for-fullscreen-ads 連結...)
Mopub SDK v5.5.0+ 都需要實做 adaptor configuration 考參考官網教學 連結
直接將 TAMediaAdapterConfiguratioin 加入專案內
#import <Foundation/Foundation.h> #import <MoPub/MoPub.h> @interface TAMediaAdapterConfiguration : MPBaseAdapterConfiguration + (void)updateInitializationParameters:(NSDictionary *)parameters; - (void)initializeNetworkWithConfiguration:(NSDictionary<NSString *, id> * _Nullable)configuration complete:(void(^ _Nullable)(NSError * _Nullable))complete; @end
#import "TAMediaAdapterConfiguration.h" #import <TAMediaAdsFramework/TAMediaAdsFramework.h> static NSString *tamediaAdaptorVersion = @"1.0.0"; @implementation TAMediaAdapterConfiguration + (void)updateInitializationParameters:(NSDictionary *)parameters { } - (NSString *)adapterVersion { return tamediaAdaptorVersion; } - (NSString *)biddingToken { return nil; } - (NSString *)moPubNetworkName { return @"tamedia"; } - (NSString *)networkSdkVersion { return [TADRequest sdkVersion]; } - (void)initializeNetworkWithConfiguration:(NSDictionary<NSString *, id> * _Nullable)configuration complete:(void(^ _Nullable)(NSError * _Nullable))complete { MPLogInfo(@"TAmedia SDK init version:%@",[TADRequest sdkVersion]); complete(nil); } @end