<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hant-TW">
	<id>https://wiki.tamedia.com.tw/wiki/index.php?action=history&amp;feed=atom&amp;title=Integration_with_AdMob_Mediation</id>
	<title>Integration with AdMob Mediation - 修訂歷史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tamedia.com.tw/wiki/index.php?action=history&amp;feed=atom&amp;title=Integration_with_AdMob_Mediation"/>
	<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=Integration_with_AdMob_Mediation&amp;action=history"/>
	<updated>2026-05-01T20:43:05Z</updated>
	<subtitle>本 Wiki 上此頁面的修訂歷史</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.tamedia.com.tw/wiki/index.php?title=Integration_with_AdMob_Mediation&amp;diff=61&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser 於 2014年1月28日 (二) 04:25</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=Integration_with_AdMob_Mediation&amp;diff=61&amp;oldid=prev"/>
		<updated>2014-01-28T04:25:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hant-TW&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上個修訂&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;於 2014年1月28日 (二) 04:25 的修訂&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l70&quot;&gt;行 70：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 70：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                                     request:(GADCustomEventRequest *)customEventRequest {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                                     request:(GADCustomEventRequest *)customEventRequest {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      CGRect frame = CGRectMake(0, 0, [UIScreen mainScreen].applicationFrame.size.width, [UIScreen mainScreen].applicationFrame.size.height);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      CGRect frame = CGRectMake(0, 0,  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                              &lt;/ins&gt;[UIScreen mainScreen].applicationFrame.size.width, [UIScreen mainScreen].applicationFrame.size.height);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      adView = [[TWMTAMediaInterstitialView alloc] initWithFrame:frame&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      adView = [[TWMTAMediaInterstitialView alloc] initWithFrame:frame&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                                                          slotId:serverParameter&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                                                          slotId:serverParameter&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Wikiuser</name></author>
	</entry>
	<entry>
		<id>https://wiki.tamedia.com.tw/wiki/index.php?title=Integration_with_AdMob_Mediation&amp;diff=60&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser：新頁面: 首先將AdMob和TAMedia SDK整合至專案中，AdMob SDK可以在這裡下載https://developers.google.com/mobile-ads-sdk/download。&lt;br&gt; 接著在AdMob Mediation新增Custom Event...</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=Integration_with_AdMob_Mediation&amp;diff=60&amp;oldid=prev"/>
		<updated>2014-01-28T03:20:22Z</updated>

		<summary type="html">&lt;p&gt;新頁面: 首先將AdMob和TAMedia SDK整合至專案中，AdMob SDK可以在這裡下載https://developers.google.com/mobile-ads-sdk/download。&amp;lt;br&amp;gt; 接著在AdMob Mediation新增Custom Event...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;首先將AdMob和TAMedia SDK整合至專案中，AdMob SDK可以在這裡下載https://developers.google.com/mobile-ads-sdk/download。&amp;lt;br&amp;gt;&lt;br /&gt;
接著在AdMob Mediation新增Custom Event（https://mediation.admob.com）。&amp;lt;br&amp;gt;&lt;br /&gt;
新增Custom Event的詳細說明可以參考https://developers.google.com/mobile-ads-sdk/docs/admob/mediation#ios。&amp;lt;br&amp;gt;&lt;br /&gt;
最後，在專案中加入與Custom Event對應的Class，其中Custom Event的Class Name需要和新增的Class Name保持一致，例如Custom Event的Class Name是TWMTAMediaCustomView，則新增的Class Name也必須為TWMTAMediaCustomView。&lt;br /&gt;
&lt;br /&gt;
== Banner廣告 ==&lt;br /&gt;
 #import &amp;quot;TWMTAMediaCustomView.h&amp;quot;&lt;br /&gt;
 #import &amp;quot;GADCustomEventBanner.h&amp;quot;&lt;br /&gt;
 #import &amp;quot;GADCustomEventBannerDelegate.h&amp;quot;&lt;br /&gt;
 #import &amp;quot;TWMTAMediaView.h&amp;quot;&lt;br /&gt;
 @interface TWMTAMediaCustomView () &amp;lt;GADCustomEventBanner, TWMTAMediaViewDelegate&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
     TWMTAMediaView *adView;&lt;br /&gt;
 }&lt;br /&gt;
 @end&lt;br /&gt;
 @implementation TWMTAMediaCustomView&lt;br /&gt;
 @synthesize delegate;&lt;br /&gt;
 - (void)requestBannerAd:(GADAdSize)adSize&lt;br /&gt;
               parameter:(NSString *)serverParameter&lt;br /&gt;
                   label:(NSString *)serverLabel&lt;br /&gt;
                 request:(GADCustomEventRequest *)customEventRequest  {&lt;br /&gt;
     &lt;br /&gt;
     CGRect frame = CGRectMake(0, 0, adSize.size.width, adSize.size.height);&lt;br /&gt;
     adView = [[TWMTAMediaView alloc] initWithFrame:CGRectMake(0, 0, 320, 50)&lt;br /&gt;
                                             slotId:serverParameter&lt;br /&gt;
                                        developerID:@&amp;quot;&amp;quot;&lt;br /&gt;
                                         gpsEnabled:YES&lt;br /&gt;
                                           testMode:NO];&lt;br /&gt;
     adView.delegate = self;&lt;br /&gt;
     [adView receiveAd];&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 - (void)viewWillLoadAd:(TWMTAMediaView *)view&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ viewWillLoadAd&amp;quot;, view);&lt;br /&gt;
     [self.delegate customEventBanner:self didReceiveAd:view];&lt;br /&gt;
 }&lt;br /&gt;
 - (void)viewDidLoadAd:(TWMTAMediaView *)view&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ viewDidLoadAd&amp;quot;, view);&lt;br /&gt;
     [self.delegate customEventBanner:self didReceiveAd:view];&lt;br /&gt;
 }&lt;br /&gt;
 - (void)view:(TWMTAMediaView *)view didFailToReceiveAdWithError:(NSError *)error&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ didFailToReceiveAdWithError:%@&amp;quot;, view, error.description);&lt;br /&gt;
     [self.delegate customEventBanner:self didFailAd:error];&lt;br /&gt;
 }&lt;br /&gt;
 - (BOOL)viewActionShouldBegin:(TWMTAMediaView *)view willLeaveApplication:(BOOL)willLeave&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ willLeaveApplication:%i&amp;quot;, view, willLeave);&lt;br /&gt;
     [self.delegate customEventBannerWillLeaveApplication:self];&lt;br /&gt;
     return YES;&lt;br /&gt;
 }&lt;br /&gt;
 @end&lt;br /&gt;
&lt;br /&gt;
== Interstitial廣告 ==&lt;br /&gt;
 #import &amp;quot;TWMTAMediaCustomInterstitialView.h&amp;quot;&lt;br /&gt;
 #import &amp;quot;GADCustomEventInterstitial.h&amp;quot;&lt;br /&gt;
 #import &amp;quot;GADCustomEventInterstitialDelegate.h&amp;quot;&lt;br /&gt;
 #import &amp;quot;TWMTAMediaInterstitialView.h&amp;quot;&lt;br /&gt;
 @interface TWMTAMediaCustomInterstitialView () &amp;lt;GADCustomEventInterstitial, TWMTAMediaInterstitialViewDelegate&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
     TWMTAMediaInterstitialView *adView;&lt;br /&gt;
 }&lt;br /&gt;
 @end&lt;br /&gt;
 @implementation TWMTAMediaCustomInterstitialView&lt;br /&gt;
 @synthesize delegate;&lt;br /&gt;
 - (void)requestInterstitialAdWithParameter:(NSString *)serverParameter&lt;br /&gt;
                                      label:(NSString *)serverLabel&lt;br /&gt;
                                    request:(GADCustomEventRequest *)customEventRequest {&lt;br /&gt;
     &lt;br /&gt;
     CGRect frame = CGRectMake(0, 0, [UIScreen mainScreen].applicationFrame.size.width, [UIScreen mainScreen].applicationFrame.size.height);&lt;br /&gt;
     adView = [[TWMTAMediaInterstitialView alloc] initWithFrame:frame&lt;br /&gt;
                                                         slotId:serverParameter&lt;br /&gt;
                                                    developerID:@&amp;quot;&amp;quot;&lt;br /&gt;
                                                     gpsEnabled:YES&lt;br /&gt;
                                                       testMode:NO];&lt;br /&gt;
     adView.delegate = self;&lt;br /&gt;
     [adView receiveAd];&lt;br /&gt;
 }&lt;br /&gt;
 - (void)presentFromRootViewController:(UIViewController *)rootViewController {&lt;br /&gt;
     CGRect frame = CGRectMake(0, 0, 0, 0);&lt;br /&gt;
     frame.size.width = [UIScreen mainScreen].applicationFrame.size.width;&lt;br /&gt;
     frame.size.height = [UIScreen mainScreen].applicationFrame.size.height;&lt;br /&gt;
     adView.frame = frame;&lt;br /&gt;
     [rootViewController.view addSubview:adView];&lt;br /&gt;
     [rootViewController.view bringSubviewToFront:adView];&lt;br /&gt;
 }&lt;br /&gt;
 - (void)interstitialViewWillLoadAd:(TWMTAMediaInterstitialView *)view&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ interstitialViewWillLoadAd&amp;quot;, view);&lt;br /&gt;
     [self.delegate customEventInterstitial:self didReceiveAd:view];&lt;br /&gt;
 }&lt;br /&gt;
 - (void)interstitialViewDidLoadAd:(TWMTAMediaInterstitialView *)view&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ interstitialViewDidLoadAd&amp;quot;, view);&lt;br /&gt;
     [self.delegate customEventInterstitial:self didReceiveAd:view];&lt;br /&gt;
 }&lt;br /&gt;
 - (void)interstitialView:(TWMTAMediaInterstitialView *)view didFailToReceiveAdWithError:(NSError *)error&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ interstitialViewdidFailToReceiveAdWithError:%@&amp;quot;, view, error.description);&lt;br /&gt;
     [self.delegate customEventInterstitial:self didFailAd:error];&lt;br /&gt;
 }&lt;br /&gt;
 - (BOOL)interstitialViewActionShouldBegin:(TWMTAMediaInterstitialView *)view willLeaveApplication:(BOOL)willLeave&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ interstitialViewwillLeaveApplication:%i&amp;quot;, view, willLeave);&lt;br /&gt;
     [self.delegate customEventInterstitialWillLeaveApplication:self];&lt;br /&gt;
     return YES;&lt;br /&gt;
 }&lt;br /&gt;
 - (void)interstitialViewWillDisappear:(TWMTAMediaInterstitialView *)view&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ interstitialViewWillDisappear&amp;quot;, view);&lt;br /&gt;
     [self.delegate customEventInterstitialWillDismiss:self];&lt;br /&gt;
 }&lt;br /&gt;
 - (void)interstitialViewDidDisappear:(TWMTAMediaInterstitialView *)view&lt;br /&gt;
 {&lt;br /&gt;
     NSLog(@&amp;quot;%@ interstitialViewDidDisappear&amp;quot;, view);&lt;br /&gt;
     [self.delegate customEventInterstitialDidDismiss:self];&lt;br /&gt;
 }&lt;br /&gt;
 @end&lt;/div&gt;</summary>
		<author><name>imported&gt;Wikiuser</name></author>
	</entry>
</feed>