<?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=SDK_8_Mopub_Mediation_Native</id>
	<title>SDK 8 Mopub Mediation Native - 修訂歷史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tamedia.com.tw/wiki/index.php?action=history&amp;feed=atom&amp;title=SDK_8_Mopub_Mediation_Native"/>
	<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;action=history"/>
	<updated>2026-05-01T21:28:19Z</updated>
	<subtitle>本 Wiki 上此頁面的修訂歷史</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1513&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser 於 2021年11月18日 (四) 10:00</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1513&amp;oldid=prev"/>
		<updated>2021-11-18T10:00:39Z</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;於 2021年11月18日 (四) 10:00 的修訂&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-l2&quot;&gt;行 2：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 2：&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;NativeAd 需要建立4個客製化class來串接廣告，其中 TAMediaCustomNativeAdEventSetting 為非必要，其他三個都必須加入專案內。&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;NativeAd 需要建立4個客製化class來串接廣告，其中 TAMediaCustomNativeAdEventSetting 為非必要，其他三個都必須加入專案內。&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;br/&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;br/&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;[[MoPub Mediation Setting|回MoPub教學]]&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;[[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SDK8 &lt;/ins&gt;MoPub Mediation Setting|回MoPub教學]]&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;br/&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;br/&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;== TAMediaCustomNativeAdEventAdapter(必要) ==&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;== TAMediaCustomNativeAdEventAdapter(必要) ==&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=SDK_8_Mopub_Mediation_Native&amp;diff=1512&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser：/* TAMediaCustomNativeAdEvent(必要) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1512&amp;oldid=prev"/>
		<updated>2021-08-26T06:28:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;TAMediaCustomNativeAdEvent(必要)&lt;/span&gt;&lt;/span&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;於 2021年8月26日 (四) 06:28 的修訂&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-l212&quot;&gt;行 212：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 212：&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;br/&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;br/&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;== TAMediaCustomNativeAdEvent(必要) ==&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;== TAMediaCustomNativeAdEvent(必要) ==&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;此 class 需繼承 MPNativeCustomEvent，由 TAmedia 取得 TADNativeAd 廣告後，建立 TADNativeAdView，並透過 adapter 取得 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MPNativeAd&lt;/del&gt;&amp;lt;br&amp;gt;&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;此 class 需繼承 MPNativeCustomEvent，由 TAmedia 取得 TADNativeAd 廣告後，建立 TADNativeAdView，並透過 adapter 取得 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MPNativeAd。&amp;lt;br&amp;gt;&lt;/ins&gt;&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;取得 TADNativeAd 廣告可以參考 [[NativeAd |TADNativeAd]] 介紹，對 TADRequest 設定參數或帶入 TADNativeAdOptions。&lt;/ins&gt;&amp;lt;br&amp;gt;&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;#建立 class 繼承 MPNativeCustomEvent&amp;lt;br&amp;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;#建立 class 繼承 MPNativeCustomEvent&amp;lt;br&amp;gt;&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;#複寫&amp;lt;code&amp;gt; - (void)requestAdWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup&amp;lt;/code&amp;gt; 在此用 TADNativeAd 去取得廣告&amp;lt;br&amp;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;#複寫&amp;lt;code&amp;gt; - (void)requestAdWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup&amp;lt;/code&amp;gt; 在此用 TADNativeAd 去取得廣告&amp;lt;br&amp;gt;&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=SDK_8_Mopub_Mediation_Native&amp;diff=1511&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser：/* TAMediaCustomNativeAdEventAdapter(必要) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1511&amp;oldid=prev"/>
		<updated>2021-08-25T01:38:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;TAMediaCustomNativeAdEventAdapter(必要)&lt;/span&gt;&lt;/span&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;於 2021年8月25日 (三) 01:38 的修訂&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-l9&quot;&gt;行 9：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 9：&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;#建立初始化方法，將TADNativeAd 及 TADNativeAdView 作為參數帶入，將由 TADNativeAd 拿到的 TADNativeAdContent 與 MPNativeAdConstants.h 提供的 key 值建立相對應的 dictionary 後賦予給 proerties &amp;lt;br&amp;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;#建立初始化方法，將TADNativeAd 及 TADNativeAdView 作為參數帶入，將由 TADNativeAd 拿到的 TADNativeAdContent 與 MPNativeAdConstants.h 提供的 key 值建立相對應的 dictionary 後賦予給 proerties &amp;lt;br&amp;gt;&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;#defaultActionURL 則回傳 nil，點擊的部分將交由 TADNativeAdView 處理&amp;lt;br&amp;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;#defaultActionURL 則回傳 nil，點擊的部分將交由 TADNativeAdView 處理&amp;lt;br&amp;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;#&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;實作&amp;lt;code&amp;gt;displayContentForURL:rootViewController:completion:&amp;lt;/code&amp;gt;當 user 點擊時觸發&amp;lt;br&amp;gt;&lt;/del&gt;&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;#&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;將由 TADNativeAd delegate 接收到的事件 nativeAdDidClick、nativeAdDidImpression、adViewWillLeaveApplication 透過 MPNativeAdAdapterDelegate 傳回給 Mopub&lt;/ins&gt;&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;參考以下代碼&amp;lt;br&amp;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;參考以下代碼&amp;lt;br&amp;gt;&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;&amp;lt;source&amp;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;&amp;lt;source&amp;gt;&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=SDK_8_Mopub_Mediation_Native&amp;diff=1510&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser：/* TAMediaCustomNativeAdEvent(必要) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1510&amp;oldid=prev"/>
		<updated>2021-08-24T01:54:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;TAMediaCustomNativeAdEvent(必要)&lt;/span&gt;&lt;/span&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;於 2021年8月24日 (二) 01:54 的修訂&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-l212&quot;&gt;行 212：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 212：&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;br/&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;br/&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;== TAMediaCustomNativeAdEvent(必要) ==&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;== TAMediaCustomNativeAdEvent(必要) ==&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;此 class 需繼承 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MPNativeCustomEvent，用來取得 &lt;/del&gt;TAmedia &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;native ad 提供給 MoPub&lt;/del&gt;&amp;lt;br&amp;gt;&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;此 class 需繼承 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;MPNativeCustomEvent，由 &lt;/ins&gt;TAmedia &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;取得 TADNativeAd 廣告後，建立 TADNativeAdView，並透過 adapter 取得 MPNativeAd&lt;/ins&gt;&amp;lt;br&amp;gt;&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;#建立 class 繼承 MPNativeCustomEvent&amp;lt;br&amp;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;#建立 class 繼承 MPNativeCustomEvent&amp;lt;br&amp;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;#複寫&amp;lt;code&amp;gt; - (void)requestAdWithCustomEventInfo:(NSDictionary *)info&amp;lt;/code&amp;gt;在此用 TADNativeAd 去取得廣告&amp;lt;br&amp;gt;&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;#複寫&amp;lt;code&amp;gt; - (void)requestAdWithCustomEventInfo:(NSDictionary *)info &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;adMarkup:(NSString *)adMarkup&lt;/ins&gt;&amp;lt;/code&amp;gt; 在此用 TADNativeAd 去取得廣告&amp;lt;br&amp;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;#&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;取得廣告後用取得的 Dictionary &lt;/del&gt;建立 &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TAMediaCustomNativeAdEventAdapter 後再用 &lt;/del&gt;adapter &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;建立MPNativeAd&amp;lt;br&amp;gt;&lt;/del&gt;&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;#&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;取得廣告後建立 TADNativeAdView &lt;/ins&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#呈現廣告前先呼叫父類別&amp;lt;code&amp;gt;precacheImagesWithURLs:completionBlock:&amp;lt;code/&amp;gt;取得image後，再呼叫&amp;lt;code&amp;gt;customNativeEvent:didLoadAd:&amp;lt;/code&amp;gt;&lt;/del&gt;&amp;lt;br&amp;gt;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#透過 TADNativeAd 及 TADNativeAdView &lt;/ins&gt;建立 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TAMediaCustomNativeAdEventAdapter，再用 &lt;/ins&gt;adapter &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;建立 MPNativeAd&lt;/ins&gt;&amp;lt;br&amp;gt;&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;br/&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;br/&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;&amp;lt;source&amp;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;&amp;lt;source&amp;gt;&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=SDK_8_Mopub_Mediation_Native&amp;diff=1509&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser：/* TAMediaCustomNativeAdRenderer(必要) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1509&amp;oldid=prev"/>
		<updated>2021-08-24T01:44:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;TAMediaCustomNativeAdRenderer(必要)&lt;/span&gt;&lt;/span&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;於 2021年8月24日 (二) 01:44 的修訂&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-l93&quot;&gt;行 93：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 93：&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;br/&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;br/&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;== TAMediaCustomNativeAdRenderer(必要) ==&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;== TAMediaCustomNativeAdRenderer(必要) ==&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;此 class 需實做 MPNativeAdRenderer &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;protocol，用於設置客製化事件處理的 &lt;/del&gt;class &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(TAMediaCustomNativeAdEvent) 以及將由 adapter 取得的 Dictionary 呈現到所需的 adView 內並回傳&lt;/del&gt;&amp;lt;br&amp;gt;&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;此 class 需實做 MPNativeAdRenderer &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;protocol，用於提供實際所要呈現的廣告視圖的 &lt;/ins&gt;class&amp;lt;br&amp;gt;&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;#實作&amp;lt;code&amp;gt;+ (MPNativeAdRendererConfiguration *)rendererConfigurationWithRendererSettings:(id&amp;lt;MPNativeAdRendererSettings&amp;gt;)rendererSettings&amp;lt;/code&amp;gt;建立 MPNativeAdRendererConfiguration物件&amp;lt;br&amp;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;#實作&amp;lt;code&amp;gt;+ (MPNativeAdRendererConfiguration *)rendererConfigurationWithRendererSettings:(id&amp;lt;MPNativeAdRendererSettings&amp;gt;)rendererSettings&amp;lt;/code&amp;gt;建立 MPNativeAdRendererConfiguration物件&amp;lt;br&amp;gt;&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;#設置 rendering class 為本身class&amp;lt;br&amp;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;#設置 rendering class 為本身class&amp;lt;br&amp;gt;&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=SDK_8_Mopub_Mediation_Native&amp;diff=1508&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser：/* TAMediaCustomNativeAdEventAdapter(必要) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1508&amp;oldid=prev"/>
		<updated>2021-08-24T01:35:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;TAMediaCustomNativeAdEventAdapter(必要)&lt;/span&gt;&lt;/span&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;於 2021年8月24日 (二) 01:35 的修訂&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-l5&quot;&gt;行 5：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 5：&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;br/&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;br/&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;== TAMediaCustomNativeAdEventAdapter(必要) ==&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;== TAMediaCustomNativeAdEventAdapter(必要) ==&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;此 class 是作為 TADNativeAd 與 MPNativeAd 的橋樑，將 TADNativeAd &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;轉換為 &lt;/del&gt;MPNativeAd &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;所需要的 Dictionary &lt;/del&gt;&amp;lt;br&amp;gt;&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;此 class 是作為 TADNativeAd 與 MPNativeAd 的橋樑，將 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TAmdia 得到的 &lt;/ins&gt;TADNativeAd &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;提供給 mopub 建立 &lt;/ins&gt;MPNativeAd &amp;lt;br&amp;gt;&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;#建立一class實做 MPNativeAdAdapter protocol，protocol 有兩必須實作 property:properties 及 defaultActionURL&amp;lt;br&amp;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;#建立一class實做 MPNativeAdAdapter protocol，protocol 有兩必須實作 property:properties 及 defaultActionURL&amp;lt;br&amp;gt;&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;#建立初始化方法，將TADNativeAd 及 TADNativeAdView 作為參數帶入，將由 TADNativeAd 拿到的 TADNativeAdContent 與 MPNativeAdConstants.h 提供的 key 值建立相對應的 dictionary 後賦予給 proerties &amp;lt;br&amp;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;#建立初始化方法，將TADNativeAd 及 TADNativeAdView 作為參數帶入，將由 TADNativeAd 拿到的 TADNativeAdContent 與 MPNativeAdConstants.h 提供的 key 值建立相對應的 dictionary 後賦予給 proerties &amp;lt;br&amp;gt;&lt;/div&gt;&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-l22&quot;&gt;行 22：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 22：&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;@property (nonatomic, readonly) NSDictionary *properties;&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;@property (nonatomic, readonly) NSDictionary *properties;&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;@property (nonatomic, readonly) NSURL *defaultActionURL;&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;@property (nonatomic, readonly) NSURL *defaultActionURL;&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;@property (nonatomic,strong) TADNativeAdView *nativeAdView;&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;@property (nonatomic, strong) TADNativeAdView *nativeAdView;&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;@property (nonatomic, weak) id&amp;lt;MPNativeAdAdapterDelegate&amp;gt; delegate;&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;@property (nonatomic, weak) id&amp;lt;MPNativeAdAdapterDelegate&amp;gt; delegate;&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;br/&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;br/&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=SDK_8_Mopub_Mediation_Native&amp;diff=1507&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser：/* TAMediaCustomNativeAdEvent(必要) */</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1507&amp;oldid=prev"/>
		<updated>2021-08-23T12:15:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;TAMediaCustomNativeAdEvent(必要)&lt;/span&gt;&lt;/span&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;於 2021年8月23日 (一) 12:15 的修訂&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-l314&quot;&gt;行 314：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行 314：&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;         [self.delegate nativeCustomEvent:self didFailToLoadAdWithError:error];&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;         [self.delegate nativeCustomEvent:self didFailToLoadAdWithError:error];&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;br/&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;br/&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;- (void)dealloc {&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;br/&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;br/&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;@end&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;@end&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=SDK_8_Mopub_Mediation_Native&amp;diff=1506&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser 於 2021年8月23日 (一) 12:13</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1506&amp;oldid=prev"/>
		<updated>2021-08-23T12:13:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;amp;diff=1506&amp;amp;oldid=1505&quot;&gt;顯示變更&lt;/a&gt;</summary>
		<author><name>imported&gt;Wikiuser</name></author>
	</entry>
	<entry>
		<id>https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1505&amp;oldid=prev</id>
		<title>imported&gt;Wikiuser：新頁面: 官方教學：[https://developers.mopub.com/networks/integrate/build-adapters-ios/#quick-start-for-native-ads 連結]&lt;br&gt; NativeAd 需要建立4個客製化class來串接廣告，其...</title>
		<link rel="alternate" type="text/html" href="https://wiki.tamedia.com.tw/wiki/index.php?title=SDK_8_Mopub_Mediation_Native&amp;diff=1505&amp;oldid=prev"/>
		<updated>2021-08-23T04:03:20Z</updated>

		<summary type="html">&lt;p&gt;新頁面: 官方教學：[https://developers.mopub.com/networks/integrate/build-adapters-ios/#quick-start-for-native-ads 連結]&amp;lt;br&amp;gt; NativeAd 需要建立4個客製化class來串接廣告，其...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;官方教學：[https://developers.mopub.com/networks/integrate/build-adapters-ios/#quick-start-for-native-ads 連結]&amp;lt;br&amp;gt;&lt;br /&gt;
NativeAd 需要建立4個客製化class來串接廣告，其中 TAMediaCustomNativeAdEventSetting 為非必要，其他三個都必須加入專案內。&lt;br /&gt;
&lt;br /&gt;
[[MoPub Mediation Setting|回MoPub教學]]&lt;br /&gt;
&lt;br /&gt;
== TAMediaCustomNativeAdEventAdapter(必要) ==&lt;br /&gt;
此 class 是作為 TADNativeAd 與 MPNativeAd 的橋樑，將 TADNativeAd 轉換為 MPNativeAd 所需要的 Dictionary &amp;lt;br&amp;gt;&lt;br /&gt;
1.建立一class實做 MPNativeAdAdapter protocol，protocol 有兩必須實作 property:properties 及 defaultActionURL&amp;lt;br&amp;gt;&lt;br /&gt;
2.建立初始化方法，將TAMedia native ad作為參數帶入，將由 TAMeida native ad 拿到的 dictionary 與 MPNativeAdConstants.h 提供的 key 值建立相對應的 dictionary 後賦予給 proerties &amp;lt;br&amp;gt;&lt;br /&gt;
3.defaultActionURL 則為 TAmedia 拿到的 nurl&amp;lt;br&amp;gt;&lt;br /&gt;
4.實作&amp;lt;code&amp;gt;displayContentForURL:rootViewController:completion:&amp;lt;/code&amp;gt;當 user 點擊時觸發&amp;lt;br&amp;gt;&lt;br /&gt;
參考以下代碼&amp;lt;br&amp;gt;&lt;br /&gt;
   //  TAMediaCustomNativeAdEventAdapter.h&lt;br /&gt;
   #import &amp;lt;Foundation/Foundation.h&amp;gt;&lt;br /&gt;
   #import &amp;lt;MoPub/MoPub.h&amp;gt;&lt;br /&gt;
   #import &amp;lt;TAMediaAdsFramework/TAMediaAdsFramework.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   @interface TAMediaCustomNativeAdEventAdapter : NSObject &amp;lt;MPNativeAdAdapter&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   - (instancetype)initWithTADNativeAd:(TADNativeAd *)nativeAd;&lt;br /&gt;
   &lt;br /&gt;
   @property (nonatomic, readonly) NSDictionary *properties;&lt;br /&gt;
   @property (nonatomic, readonly) NSURL *defaultActionURL;&lt;br /&gt;
   @property (nonatomic, weak) id&amp;lt;MPNativeAdAdapterDelegate&amp;gt; delegate;&lt;br /&gt;
   @end&lt;br /&gt;
&lt;br /&gt;
   //  TAMediaCustomNativeAdEventAdapter.m&lt;br /&gt;
   #import &amp;quot;TAMediaCustomNativeAdEventAdapter.h&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
   @interface TAMediaCustomNativeAdEventAdapter () &amp;lt;TADNativeAdDelegate&amp;gt;&lt;br /&gt;
   @property (nonatomic,strong) TADNativeAd *nativeAd;&lt;br /&gt;
   @end&lt;br /&gt;
   &lt;br /&gt;
   @implementation TAMediaCustomNativeAdEventAdapter &lt;br /&gt;
    &lt;br /&gt;
   - (instancetype)initWithTADNativeAd:(TADNativeAd *)nativeAd {&lt;br /&gt;
    self = [super init];&lt;br /&gt;
    NSDictionary *tadDic = [nativeAd getNativeAdContent];&lt;br /&gt;
    nativeAd.delegate = self;&lt;br /&gt;
    self.nativeAd = nativeAd;&lt;br /&gt;
    self = [self initWithTADic:tadDic];&lt;br /&gt;
    return self;&lt;br /&gt;
    }&lt;br /&gt;
   - (instancetype)initWithTADic:(NSDictionary *)taDic {&lt;br /&gt;
       self = [super init];&lt;br /&gt;
       NSDictionary *taMeidaDicMapping = @{@&amp;quot;LONGSUBJECT&amp;quot;:kAdTitleKey,&lt;br /&gt;
                                        @&amp;quot;BODY&amp;quot;:kAdTextKey,&lt;br /&gt;
                                        @&amp;quot;ICONSQUARE&amp;quot;:kAdIconImageKey,&lt;br /&gt;
                                        @&amp;quot;IMAGE1200X627&amp;quot;:kAdMainImageKey,&lt;br /&gt;
                                        @&amp;quot;VIDEO&amp;quot;:kVASTVideoKey,&lt;br /&gt;
                                        @&amp;quot;nurl&amp;quot;:kDefaultActionURLKey,&lt;br /&gt;
                                        @&amp;quot;CTA&amp;quot;:kAdCTATextKey&lt;br /&gt;
                                        };&lt;br /&gt;
    &lt;br /&gt;
    NSMutableDictionary *dic = [NSMutableDictionary new];&lt;br /&gt;
    for (NSString *key in taDic.allKeys) {&lt;br /&gt;
        NSString *newKey = taMeidaDicMapping[key];&lt;br /&gt;
        if (newKey == nil) {&lt;br /&gt;
            newKey = key;&lt;br /&gt;
        }&lt;br /&gt;
        [dic setObject:taDic[key] forKey:newKey];&lt;br /&gt;
    }&lt;br /&gt;
       _properties = dic;&lt;br /&gt;
       _defaultActionURL = [NSURL URLWithString:taDic[@&amp;quot;nurl&amp;quot;]];&lt;br /&gt;
       return self;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
    - (void)displayContentForURL:(NSURL *)URL rootViewController:(UIViewController *)controller {    &lt;br /&gt;
        [self.nativeAd handleClick];&lt;br /&gt;
        if ([self.delegate respondsToSelector:@selector(nativeAdDidClick:)]) {&lt;br /&gt;
           [self.delegate nativeAdDidClick:self];&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
    - (void)adViewWillLeaveApplication:(TADNativeAd *)adView {&lt;br /&gt;
        if ([self.delegate respondsToSelector:@selector(nativeAdWillLeaveApplicationFromAdapter:)]) {&lt;br /&gt;
            [self.delegate nativeAdWillLeaveApplicationFromAdapter:self];&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
   @end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== TAMediaCustomNativeAdRenderer ==&lt;br /&gt;
此 class 需實做 MPNativeAdRenderer protocol，用於設置客製化事件處理的 class (TAMediaCustomNativeAdEvent) 以及將由 adapter 取得的 Dictionary 呈現到所需的 adView 內並回傳&amp;lt;br&amp;gt;&lt;br /&gt;
1.實作&amp;lt;code&amp;gt;+ (MPNativeAdRendererConfiguration *)rendererConfigurationWithRendererSettings:(id&amp;lt;MPNativeAdRendererSettings&amp;gt;)rendererSettings&amp;lt;/code&amp;gt;建立 MPNativeAdRendererConfiguration物件&amp;lt;br&amp;gt;&lt;br /&gt;
2.設置 rendering class 為本身class&amp;lt;br&amp;gt;&lt;br /&gt;
3.設置 rendererSettings 為參數傳入 的rendererSettings&amp;lt;br&amp;gt;&lt;br /&gt;
4.設置 supportedCustomEvents 為 TAMediaCustomNativeAdEvent class&amp;lt;br&amp;gt;&lt;br /&gt;
5.實作&amp;lt;code&amp;gt;initWithRendererSettings:&amp;lt;/code&amp;gt;設置物件viewSizeHandler，以及任何客製化設定&amp;lt;br&amp;gt;&lt;br /&gt;
6.實作&amp;lt;code&amp;gt;retrieveViewWithAdapter:&amp;lt;/code&amp;gt;回傳要來呈顯在畫面上的 View&amp;lt;br&amp;gt;&lt;br /&gt;
參考以下代碼&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   //  TAMediaCustomNativeAdRenderer.h&lt;br /&gt;
   #import &amp;lt;Foundation/Foundation.h&amp;gt;&lt;br /&gt;
   #import &amp;lt;MoPub/MoPub.h&amp;gt;&lt;br /&gt;
   @interface TAMediaCustomNativeAdRenderer : NSObject &amp;lt;MPNativeAdRenderer&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   @property (nonatomic, readonly) MPNativeViewSizeHandler viewSizeHandler;&lt;br /&gt;
   &lt;br /&gt;
   @end&lt;br /&gt;
&lt;br /&gt;
   //  TAMediaCustomNativeAdRenderer.m&lt;br /&gt;
   #import &amp;quot;TAMediaCustomNativeAdRenderer.h&amp;quot;&lt;br /&gt;
   #import &amp;quot;MPNativeAdView.h&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
   @interface TAMediaCustomNativeAdRenderer() &amp;lt;MPNativeAdRendererImageHandlerDelegate&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   @property (nonatomic,strong) id&amp;lt;MPNativeAdRendererSettings&amp;gt;setting;&lt;br /&gt;
   &lt;br /&gt;
   @property (nonatomic,strong) MPNativeAdRendererImageHandler *rendererImageHandler;&lt;br /&gt;
   &lt;br /&gt;
   @end&lt;br /&gt;
    &lt;br /&gt;
   @implementation TAMediaCustomNativeAdRenderer&lt;br /&gt;
   &lt;br /&gt;
   + (MPNativeAdRendererConfiguration *)rendererConfigurationWithRendererSettings:(id&amp;lt;MPNativeAdRendererSettings&amp;gt;)rendererSettings {&lt;br /&gt;
       MPNativeAdRendererConfiguration *config = [[MPNativeAdRendererConfiguration alloc] init];&lt;br /&gt;
       config.rendererSettings = rendererSettings;&lt;br /&gt;
       config.supportedCustomEvents = @[@&amp;quot;TAMediaCustomNativeAdEvent&amp;quot;];'''//設置客製化事件處理的class'''&lt;br /&gt;
       config.rendererClass = [self class];&lt;br /&gt;
       return config;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   - (instancetype)initWithRendererSettings:(id&amp;lt;MPNativeAdRendererSettings&amp;gt;)rendererSettings {&lt;br /&gt;
       self = [super init];&lt;br /&gt;
       _viewSizeHandler = [rendererSettings.viewSizeHandler copy];&lt;br /&gt;
       self.setting = rendererSettings;&lt;br /&gt;
       self.rendererImageHandler = [MPNativeAdRendererImageHandler new];&lt;br /&gt;
       self.rendererImageHandler.delegate = self;&lt;br /&gt;
       return self;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   - (UIView *)retrieveViewWithAdapter:(id&amp;lt;MPNativeAdAdapter&amp;gt;)adapter error:(NSError **)error {&lt;br /&gt;
       UIView&amp;lt;MPNativeAdRendering&amp;gt; *adView = [MPNativeAdView new];&lt;br /&gt;
       '''//MPNativeAdRendering potocol設置的項目'''&lt;br /&gt;
       '''//需依照串接不同的Native廣告，設定不同的值'''&lt;br /&gt;
       adView.nativeTitleTextLabel.text = adapter.properties[kAdTitleKey];&lt;br /&gt;
       adView.nativeMainTextLabel.text = adapter.properties[kAdTextKey];&lt;br /&gt;
       adView.nativeCallToActionTextLabel.text = adapter.properties[kAdCTATextKey];&lt;br /&gt;
       [self.rendererImageHandler loadImageForURL:[NSURL URLWithString:[adapter.properties objectForKey:kAdIconImageKey]] intoImageView:adView.nativeIconImageView];&lt;br /&gt;
       [self.rendererImageHandler loadImageForURL:[NSURL URLWithString:[adapter.properties objectForKey:kAdMainImageKey]] intoImageView:adView.nativeMainImageView];&lt;br /&gt;
       &lt;br /&gt;
       '''//MPNativeAdRendering potocol以外的項目用以下方式設置'''&lt;br /&gt;
       MPNativeAdRenderingImageLoader *imageLoader = [[MPNativeAdRenderingImageLoader alloc] initWithImageHandler:self.rendererImageHandler];&lt;br /&gt;
       [adView layoutCustomAssetsWithProperties:adapter.properties imageLoader:imageLoader];&lt;br /&gt;
       return adView;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   - (BOOL)nativeAdViewInViewHierarchy&lt;br /&gt;
   {&lt;br /&gt;
       return YES;&lt;br /&gt;
   }&lt;br /&gt;
   @end&lt;br /&gt;
&lt;br /&gt;
== TAMediaCustomNativeAdEvent(必要) ==&lt;br /&gt;
此 class 需繼承 MPNativeCustomEvent，用來取得 TAmedia native ad 提供給 MoPub&amp;lt;br&amp;gt;&lt;br /&gt;
1.建立 class 繼承 MPNativeCustomEvent&amp;lt;br&amp;gt;&lt;br /&gt;
2.複寫&amp;lt;code&amp;gt; - (void)requestAdWithCustomEventInfo:(NSDictionary *)info&amp;lt;/code&amp;gt;在此用 TADNativeAd 去取得廣告&amp;lt;br&amp;gt;&lt;br /&gt;
3.取得廣告後用取得的 Dictionary 建立 TAMediaCustomNativeAdEventAdapter 後再用 adapter 建立MPNativeAd&amp;lt;br&amp;gt;&lt;br /&gt;
4.呈現廣告前先呼叫父類別&amp;lt;code&amp;gt;precacheImagesWithURLs:completionBlock:&amp;lt;code/&amp;gt;取得image後，再呼叫&amp;lt;code&amp;gt;customNativeEvent:didLoadAd:&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  #import &amp;lt;MoPub/MoPub.h&amp;gt;&lt;br /&gt;
  #import &amp;lt;TAMediaAdsFramework/TAMediaAdsFramework.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  @interface TAMediaCustomNativeAdEvent : MPNativeCustomEvent &amp;lt;TADNativeAdDelegate&amp;gt; {&lt;br /&gt;
      TADNativeAd *nativeAd;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  @end&lt;br /&gt;
&lt;br /&gt;
  #import &amp;quot;TAMediaCustomNativeAdEvent.h&amp;quot;&lt;br /&gt;
  #import &amp;quot;TAMediaCustomNativeAdEventAdapter.h&amp;quot;&lt;br /&gt;
  #import &amp;lt;MoPub/MoPub.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  @implementation TAMediaCustomNativeAdEvent&lt;br /&gt;
  &lt;br /&gt;
  - (void)requestAdWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup {&lt;br /&gt;
      TADRequest *request = [TADRequest request];&lt;br /&gt;
      request.testing = NO;&lt;br /&gt;
    // Type: TADGender&lt;br /&gt;
      request.gender = kTADGenderUnknown;&lt;br /&gt;
      &lt;br /&gt;
      // NAD 物件初始化, 帶入自訂的origin&lt;br /&gt;
      if (!nativeAd) {&lt;br /&gt;
          nativeAd = [[TADNativeAd alloc] initWithAdUnitId:info[@&amp;quot;NativeId&amp;quot;]];        &lt;br /&gt;
      }&lt;br /&gt;
      // 必須要設定delegate&lt;br /&gt;
      nativeAd.delegate = self;&lt;br /&gt;
      // 載入廣告&lt;br /&gt;
      [nativeAd loadRequest:request];&lt;br /&gt;
  &lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  - (void)nativeAdDidReceiveAd:(TADNativeAd *)ad {&lt;br /&gt;
      // 表示本次請求收到廣告&lt;br /&gt;
      TAMediaCustomNativeAdEventAdapter *adapter = [[TAMediaCustomNativeAdEventAdapter alloc] initWithTADNativeAd:ad];&lt;br /&gt;
      MPNativeAd *mpNativeAd = [[MPNativeAd alloc] initWithAdAdapter:adapter];&lt;br /&gt;
      //藉由 getNativeAdContent 取得包含回覆內容的 NSDictionary&lt;br /&gt;
      NSDictionary *nadDic = [nativeAd getNativeAdContent];&lt;br /&gt;
      NSMutableArray *imageURLs = [NSMutableArray array];&lt;br /&gt;
      for (NSString *key in nadDic.allKeys) {&lt;br /&gt;
          if ([[key lowercaseString] hasPrefix:@&amp;quot;image&amp;quot;] || [key hasPrefix:@&amp;quot;ICON&amp;quot;]) {&lt;br /&gt;
              if (nadDic[key] &amp;amp;&amp;amp; ![nadDic[key] isEqualToString:@&amp;quot;&amp;quot;]) {&lt;br /&gt;
                  NSURL *url = [NSURL URLWithString:nadDic[key]];&lt;br /&gt;
                  [imageURLs addObject:url];&lt;br /&gt;
              }            &lt;br /&gt;
          }&lt;br /&gt;
      }&lt;br /&gt;
      //在呼叫delegate didloadAd前先將圖片預載&lt;br /&gt;
      [super precacheImagesWithURLs:imageURLs completionBlock:^(NSArray *errors) {&lt;br /&gt;
          if (errors) {            &lt;br /&gt;
              [self.delegate nativeCustomEvent:self didFailToLoadAdWithError:MPNativeAdNSErrorForImageDownloadFailure()];&lt;br /&gt;
          } else {&lt;br /&gt;
              [self.delegate nativeCustomEvent:self didLoadAd:mpNativeAd];&lt;br /&gt;
          }&lt;br /&gt;
      }];&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  - (void)nativeAd:(TADNativeAd *)ad didFailToReceiveAdWithError:(TADRequestError *)error {&lt;br /&gt;
      if ([self.delegate respondsToSelector:@selector(nativeCustomEvent:didFailToLoadAdWithError:)]) {&lt;br /&gt;
          [self.delegate nativeCustomEvent:self didFailToLoadAdWithError:error];&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  - (void)dealloc {&lt;br /&gt;
      if (nativeAd != nil) {&lt;br /&gt;
          nativeAd.delegate = nil;&lt;br /&gt;
          nativeAd = nil;&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  @end&lt;br /&gt;
&lt;br /&gt;
== TAMediaCustomNativeAdEventSetting ==&lt;br /&gt;
此class需實做MPNativeAdRendererSettings protocol，用來設定 viewSize，與指定需要來呈現廣告的 View，亦可使用 MPNativeAdRendererSettings 取代&amp;lt;br&amp;gt;&lt;br /&gt;
   //  TAMediaCustomNativeAdEventSetting.h&lt;br /&gt;
   #import &amp;lt;Foundation/Foundation.h&amp;gt;&lt;br /&gt;
   #import &amp;lt;MoPub/MoPub.h&amp;gt;&lt;br /&gt;
   @interface TAMediaCustomNativeAdEventSetting : NSObject &amp;lt;MPNativeAdRendererSettings&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   @property (nonatomic, assign) Class renderingViewClass;&lt;br /&gt;
   &lt;br /&gt;
   @property (nonatomic, readwrite, copy) MPNativeViewSizeHandler viewSizeHandler;&lt;br /&gt;
   @end&lt;br /&gt;
&lt;br /&gt;
   //  TAMediaCustomNativeAdEventSetting.m&lt;br /&gt;
   #import &amp;quot;TAMediaCustomNativeAdEventSetting.h&amp;quot;&lt;br /&gt;
   @implementation TAMediaCustomNativeAdEventSetting&lt;br /&gt;
   @end&lt;/div&gt;</summary>
		<author><name>imported&gt;Wikiuser</name></author>
	</entry>
</feed>