ה-SDK של tvOS בצד הלקוח השתנה מעט מאוד עם השקת הגרסה 4. השינוי העיקרי הוא ההוספה של IMAAdDisplayContainer
, כפי שניתן לראות ב-SDK של iOS.
במדריך הזה מתואר התהליך הנדרש לשדרוג של הטמעה קיימת של גרסה 3 ל-SDK החדש של גרסה 4.
שינוי שם המודול
כדי להתאים ל-iOS SDK, שינינו את שם המודול מ-ClientSideInteractiveMediaAds
ל-GoogleInteractiveMediaAds
, לכן עליך לבצע את השינויים הבאים.
השינויים | |
---|---|
ישן |
#import <ClientSideInteractiveMediaAds/ClientSideInteractiveMediaAds.h> @import ClientSideInteractiveMediaAds; |
חדש |
#import <GoogleInteractiveMediaAds/GoogleInteractiveMediaAds.h> @import GoogleInteractiveMediaAds; |
יצירת מאגר המודעות החדש
יצירה והעברה בתוך IMAAdDisplayContainer | |
---|---|
ישן |
IMAAdsRequest *adsRequest = [[IMAAdsRequest alloc] initWithAdTagUrl:kAdTagUrlString adDisplayContainer:self.videoView contentPlayhead:self.contentPlayhead userContext:userContext]; |
חדש |
self.adDisplayContainer = [[IMAAdDisplayContainer alloc] initWithAdContainer:self.videoView]; IMAAdsRequest *adsRequest = [[IMAAdsRequest alloc] initWithAdTagUrl:kAdTagUrlString adDisplayContainer:self.adDisplayContainer contentPlayhead:self.contentPlayhead userContext:userContext]; |