ios
  • uiwebview
  • adsense
  • 2017-05-26 54 views 0 likes 
    0

    我試圖在UIWebView中顯示AdSense。像...是否有可能在UIWebView中顯示AdSense?

    NSString *test = @" 
        <script async src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'> 
        </script> 
        <ins class='adsbygoogle' 
         style='display:inline-block;width:300px;height:250px' 
         data-ad-client='ca-pub--------------' 
         data-ad-slot='-------'> 
        </ins> 
    <script> 
        (adsbygoogle = window.adsbygoogle || []).push({}); 
    </script> 
    " 
    [webView loadHTMLString:test baseURL:nil]; 
    

    只有空的空間。 如何顯示它?

    +0

    請檢查該 https://stackoverflow.com/questions/32582198/load-local-javascript-in-webview 它會幫助你。謝謝。 –

    回答

    0

    不,您不能在移動應用程序中使用AdSense移動版是違反AdSense政策的行爲。

    https://support.google.com/adsense/answer/3394713?hl=en&ref_topic=1250104#2

    相關問題