「SDK8 Mopub Mediation Adapter Configuration」修訂間的差異
跳至導覽
跳至搜尋
imported>Wikiuser (新頁面: Mopub SDK v5.5.0+ 都需要實做 adaptor configuration 考參考官網教學 [https://developers.mopub.com/networks/integrate/build-adapters-ios/#quick-start-for-fullscreen-ads 連結...) |
CharlesWang(留言 | 貢獻) |
||
(未顯示由 1 位使用者於中間所作的 1 次修訂) | |||
行 2: | 行 2: | ||
直接將 TAMediaAdapterConfiguratioin .h.m 加入專案內 | 直接將 TAMediaAdapterConfiguratioin .h.m 加入專案內 | ||
[[MoPub Mediation Setting|回MoPub教學]] | [[SDK8 MoPub Mediation Setting | 回MoPub教學]] | ||
< | <nowiki> | ||
#import <Foundation/Foundation.h> | #import <Foundation/Foundation.h> | ||
#import <MoPub/MoPub.h> | #import <MoPub/MoPub.h> | ||
行 56: | 行 56: | ||
@end | @end | ||
</ | </nowiki> |
於 2022年4月21日 (四) 08:25 的最新修訂
Mopub SDK v5.5.0+ 都需要實做 adaptor configuration 考參考官網教學 連結
直接將 TAMediaAdapterConfiguratioin .h.m 加入專案內
#import <Foundation/Foundation.h> #import <MoPub/MoPub.h> NS_ASSUME_NONNULL_BEGIN @interface TAMediaAdapterConfiguration : MPBaseAdapterConfiguration + (void)updateInitializationParameters:(NSDictionary *)parameters; - (void)initializeNetworkWithConfiguration:(NSDictionary<NSString *, id> * _Nullable)configuration complete:(void(^ _Nullable)(NSError * _Nullable))complete; @end NS_ASSUME_NONNULL_END </source> <source> #import "TAMediaAdapterConfiguration.h" #import <TAMediaAdsFramework/TAMediaAdsFramework.h> #import <MoPub/MoPub.h> static NSString *tamediaAdapterVersion = @"8.0.0"; @implementation TAMediaAdapterConfiguration + (void)updateInitializationParameters:(NSDictionary *)parameters { } - (NSString *)adapterVersion { return tamediaAdapterVersion; } - (NSString *)biddingToken { return nil; } - (NSString *)moPubNetworkName { return @"tamedia"; } - (NSString *)networkSdkVersion { return [TADMobileAds getSDKVersion]; } - (void)initializeNetworkWithConfiguration:(NSDictionary<NSString *, id> * _Nullable)configuration complete:(void(^ _Nullable)(NSError * _Nullable))complete { [TADMobileAds config]; MPLogInfo(@"TAmedia SDK init version:%@",[TADMobileAds getSDKVersion]); complete(nil); } @end