{"id":10847,"date":"2024-08-30T09:15:19","date_gmt":"2024-08-30T07:15:19","guid":{"rendered":"https:\/\/refinery89.com\/?post_type=docs&#038;p=10847"},"modified":"2024-08-30T09:15:19","modified_gmt":"2024-08-30T07:15:19","slug":"webview-initialization","status":"publish","type":"docs","link":"https:\/\/refinery89.com\/es\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/","title":{"rendered":"WebView Initialization"},"content":{"rendered":"<ul class=\"ak-ul\" data-pm-slice=\"0 0 []\">\n<li><a href=\"https:\/\/refinery89.atlassian.net\/wiki\/spaces\/R8P\/pages\/edit-v2\/1160970243#How-it-works%3F\">How it works?<\/a><\/li>\n<li><a href=\"https:\/\/refinery89.atlassian.net\/wiki\/spaces\/R8P\/pages\/edit-v2\/1160970243#What-is-needed%3F\">What is needed?<\/a>\n<ul class=\"ak-ul\">\n<li><a href=\"https:\/\/refinery89.atlassian.net\/wiki\/spaces\/R8P\/pages\/edit-v2\/1160970243#Information-we-require-about-your-app\">Information we require about your app<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/refinery89.atlassian.net\/wiki\/spaces\/R8P\/pages\/edit-v2\/1160970243#Example-in-the-Demo\">Examples<\/a>\n<ul class=\"ak-ul\">\n<li><a href=\"https:\/\/refinery89.atlassian.net\/wiki\/spaces\/R8P\/pages\/edit-v2\/1160970243#Example-in-the-Demo\">Example in the Demo<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1>How it works?<\/h1>\n<p>We configure your webview to create a channel between our web header script and the Native SDK, this enables better privacy compliance and targeting.<\/p>\n<p>With this in place you can use <span class=\"code\" spellcheck=\"false\">loadUrlWithConsentDataOrWait<\/span> to load the URL with consent data.<\/p>\n<h1>What is needed?<\/h1>\n<ol class=\"ak-ol\" start=\"1\">\n<li>Get started by creating an account with us. <a href=\"https:\/\/refinery89.com\/es\/lets-connect\/\">Contact us<\/a> to initiate the process and provide all the necessary information listed below.<\/li>\n<li>Add the Initialization code.<\/li>\n<li>Follow This Guide<\/li>\n<li>Your web-app is now prepared for monetization with us.<\/li>\n<\/ol>\n<h2>Information we require about your app<\/h2>\n<ul class=\"ak-ul\">\n<li>Store Link (<em>m\u00e9tricas de Google<\/em> o <em>Apple<\/em> one).<\/li>\n<li>Domain of the app. E.g.: <a href=\"https:\/\/refinery89.com\/es\/\"><em>www.refinery89.com<\/em><\/a><em>.<\/em><\/li>\n<\/ul>\n<h2>Example in the Demo<\/h2>\n<p>You will use Android\u2019s WebView View in your app, but instead of loading the url with<span class=\"code\" spellcheck=\"false\">WebView.loadUrl()<\/span>you need to configure the webview with <span class=\"code\" spellcheck=\"false\">R89SDK.configureWebView<\/span>() and then use <span class=\"code\" spellcheck=\"false\">R89SDK.loadUrlWithConsentDataOrWait()<\/span>.<\/p>\n<p>Function <span class=\"code\" spellcheck=\"false\">R89SDK.configureWebView<\/span> takes 3 parameters, which are:<\/p>\n<ul class=\"ak-ul\">\n<li><strong>webView <\/strong>&#8211; your webView<\/li>\n<li><strong>userAgent<\/strong> &#8211; userAgent string, which can be acquired with -&gt;<br \/>\n<span class=\"code\" spellcheck=\"false\">R89SDK.getUserAgent(webView = webview!!, siteName =&#8221;WebViewDemo&#8221;)<\/span><\/li>\n<li><strong>webViewClient<\/strong> &#8211; <span class=\"code\" spellcheck=\"false\">R89WebViewClient<\/span> object, child of <span class=\"code\" spellcheck=\"false\">WebViewClient<\/span>, in which you can override callback functions like:\n<ul class=\"ak-ul\">\n<li><strong>r89OnPageFinished<\/strong> &#8211; is called when page finished loading<\/li>\n<li><strong>r89OnPageStarted<\/strong> &#8211; is called when page started loading<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Example:<\/p>\n<div class=\"fabric-editor-breakout-mark\" data-mode=\"wide\">\n<pre><code>R89SDK.configureWebView(webview!!, userAgent, object : R89WebViewClient()\r\n{\r\n\/\/ Here you can override WebViewClient methods in case you need them\r\n})<\/code><\/pre>\n<\/div>\n<p>If you want to add any Banner\/Outstream or other formats outside of the WebView you can do so the same way it is done in <a href=\"https:\/\/refinery89.atlassian.net\/wiki\/spaces\/R8P\/pages\/529432600\">Manual initialization<\/a>.<\/p>\n<div data-panel-type=\"info\">\n<div data-panel-content=\"true\">\n<p>if you wanted you could create your own custom <a href=\"https:\/\/developer.android.com\/reference\/android\/webkit\/WebView#addJavascriptInterface(java.lang.Object,%20java.lang.String)\">JavaScriptInterface<\/a> from the web part of the app to display the ads in the native part interacting and controlling them from the webpart.<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>","protected":false},"featured_media":0,"parent":10817,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-10847","docs","type-docs","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WebView Initialization | Refinery89<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/refinery89.com\/es\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WebView Initialization | Refinery89\" \/>\n<meta property=\"og:description\" content=\"How it works? What is needed? Information we require about your app Examples Example in the Demo How it works? We configure your webview to create a channel between our web header script and the Native SDK, this enables better privacy compliance and targeting. With this in place you can use loadUrlWithConsentDataOrWait to load the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/refinery89.com\/es\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/\" \/>\n<meta property=\"og:site_name\" content=\"Refinery89\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Refinery89\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@refinery89\" \/>\n<meta name=\"twitter:label1\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/\",\"url\":\"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/\",\"name\":\"WebView Initialization | Refinery89\",\"isPartOf\":{\"@id\":\"https:\/\/refinery89.com\/#website\"},\"datePublished\":\"2024-08-30T07:15:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/refinery89.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IOS &#8211; Monetize App SDK Documentation\",\"item\":\"https:\/\/refinery89.com\/it\/docs\/ios-monetize-app-sdk-documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Privato: User Manual\",\"item\":\"https:\/\/refinery89.com\/it\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Initialization Types\",\"item\":\"https:\/\/refinery89.com\/it\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"WebView Initialization\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/refinery89.com\/#website\",\"url\":\"https:\/\/refinery89.com\/\",\"name\":\"Refinery89\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/refinery89.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/refinery89.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/refinery89.com\/#organization\",\"name\":\"Refinery89\",\"alternateName\":\"R89\",\"url\":\"https:\/\/refinery89.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/refinery89.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png\",\"contentUrl\":\"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png\",\"width\":200,\"height\":200,\"caption\":\"Refinery89\"},\"image\":{\"@id\":\"https:\/\/refinery89.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Refinery89\/\",\"https:\/\/x.com\/refinery89\",\"https:\/\/www.linkedin.com\/company\/refinery89\/\",\"https:\/\/www.youtube.com\/@refinery89\",\"https:\/\/www.instagram.com\/refinery_89\/\",\"https:\/\/www.reddit.com\/user\/Refinery89\/\",\"https:\/\/share.google\/K8hFf3ktmUrTi1XCa\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WebView Initialization | Refinery89","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/refinery89.com\/es\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/","og_locale":"es_ES","og_type":"article","og_title":"WebView Initialization | Refinery89","og_description":"How it works? What is needed? Information we require about your app Examples Example in the Demo How it works? We configure your webview to create a channel between our web header script and the Native SDK, this enables better privacy compliance and targeting. With this in place you can use loadUrlWithConsentDataOrWait to load the [&hellip;]","og_url":"https:\/\/refinery89.com\/es\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/","og_site_name":"Refinery89","article_publisher":"https:\/\/www.facebook.com\/Refinery89\/","og_image":[{"width":200,"height":200,"url":"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@refinery89","twitter_misc":{"Tiempo de lectura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/","url":"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/","name":"WebView Initialization | Refinery89","isPartOf":{"@id":"https:\/\/refinery89.com\/#website"},"datePublished":"2024-08-30T07:15:19+00:00","breadcrumb":{"@id":"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/refinery89.com\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/webview-initialization\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/refinery89.com\/"},{"@type":"ListItem","position":2,"name":"IOS &#8211; Monetize App SDK Documentation","item":"https:\/\/refinery89.com\/it\/docs\/ios-monetize-app-sdk-documentation\/"},{"@type":"ListItem","position":3,"name":"Privato: User Manual","item":"https:\/\/refinery89.com\/it\/"},{"@type":"ListItem","position":4,"name":"Initialization Types","item":"https:\/\/refinery89.com\/it\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/"},{"@type":"ListItem","position":5,"name":"WebView Initialization"}]},{"@type":"WebSite","@id":"https:\/\/refinery89.com\/#website","url":"https:\/\/refinery89.com\/","name":"Refinery89","description":"","publisher":{"@id":"https:\/\/refinery89.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/refinery89.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/refinery89.com\/#organization","name":"Refinery89","alternateName":"R89","url":"https:\/\/refinery89.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/refinery89.com\/#\/schema\/logo\/image\/","url":"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png","contentUrl":"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png","width":200,"height":200,"caption":"Refinery89"},"image":{"@id":"https:\/\/refinery89.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Refinery89\/","https:\/\/x.com\/refinery89","https:\/\/www.linkedin.com\/company\/refinery89\/","https:\/\/www.youtube.com\/@refinery89","https:\/\/www.instagram.com\/refinery_89\/","https:\/\/www.reddit.com\/user\/Refinery89\/","https:\/\/share.google\/K8hFf3ktmUrTi1XCa"]}]}},"comment_count":0,"_links":{"self":[{"href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/docs\/10847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/comments?post=10847"}],"version-history":[{"count":0,"href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/docs\/10847\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/docs\/10817"}],"prev":[{"title":"Manual Initialization","link":"https:\/\/refinery89.com\/es\/docs\/ios-monetize-app-sdk-documentation\/user-manual\/initialization-types\/manual-initialization\/","href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/docs\/10820"}],"wp:attachment":[{"href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/media?parent=10847"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/refinery89.com\/es\/wp-json\/wp\/v2\/doc_tag?post=10847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}