ios
  • uiwebview
  • adsense
  • 2017-05-26 57 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

    相关问题