How Does It Work?
We fetch all units configurations from our Database and you simply need to place the units using the IDs we provide to you with the RefineryAdFactory. Incorporate them into the desired views. The factory methods work as follows:
class MainViewController: UiViewControlelr {
// The SDK will place the advertisement inside this view.
@IBOutlet var adContainer:UIView!
…
override func viewDidLoad() {
super.viewDidLoad()
let configurationID = ConfigBuilder.companion.BANNER_TEST_R89_CONFIG_ID
RefineryAdFactory.shared.createBanner(configurationID: configurationID,
wrapper: adContainer,
lifecycleCallbacks: nil)
}
…
}
Check Formatos de anuncios to see how to do it with each format.
What Is Needed?
-
Comience creando una cuenta con nosotros. Contact us para iniciar el proceso y proporcionar toda la información necesaria que se detalla a continuación.
-
Add the wrapper/trigger (transitions o button clicks) into your app.
-
Add the Initialization code.
-
Follow our ad format guides for their implementation.
-
Get those wrappers or triggers from Activities or Fragments.
-
Usar
RefineryAdFactoryto display the ads.
-
-
Tu aplicación está ahora preparada para la monetización con nosotros.
Información que necesitamos sobre tu aplicación
-
¿Qué formatos tienes la intención de utilizar? Si no estás seguro de los formatos, por favor consulta su páginas dedicadas o comunícate para pedir ayuda contactarnos.
-
Enlace de la tienda (métricas de Google o Manzana uno).
-
Domain of the app. E.g: www.refinery89.com
-
(Optional) Desired App Keywords.
Ejemplos
At the end of the example, you can find a plantilla de producción aquí.
If you are in Debug mode, please add these lines before any of the examples. Marking the SDK as Debug will make the SDK use ConfigBuilder IDs and data.
R89SDK.shared.setLogLevel(level: LogLevels.debug)
R89SDK.shared.setDebug(getLocalFakeData: true,
forceCMP: true,
useProductionAuctionServer: false)
The example in the demo
El línea única bandera está establecida en false. Use the RefineryAdFactory to create and place the ADs in a UIView.
R89SDK.shared.initialize(publisherId: “TestRefinery89ID”,
appId: “TestConfigDemoApp”,
singleLine: false,
publisherInitializationEvents: nil)
Plantilla
R89SDK.shared.initialize(publisherId: <YOUR PUBLISHER ID>,
appId: <YOUR APP ID>,
singleLine: false,
publisherInitializationEvents: nil)
Initialization
To initialize the SDK call R89SDK.shared.initialize method and pass the publisherId y appId.
class MainViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
R89SDK.shared.initialize(publisherId: “TestRefinery89ID”,
appId: “TestConfigDemoApp”,
singleLine: false,
publisherInitializationEvents: nil)
}
}
At this point, the advertisements can be displayed. To place a simple banner Ad follow the example below
class MainViewController: UIViewController {
@IBOutlet var adContainer:UIView! = nil
override func viewDidLoad() {
super.viewDidLoad()
R89SDK.shared.initialize(publisherId: <YOUR PUBLISHER ID>,
appId: <YOUR APP ID>,
singleLine: false,
publisherInitializationEvents: nil)
RefineryAdFactory.shared.createBanner(configurationID: <R89-Banner-ID>, wrapper: adContainer, lifecycleCallbacks: nil)
}
}
The SDK will put the advertisement inside the provided adContainer.
Note that no need to await for SDK initialization, advertisements can be used right after calling the R89SDK.shared.initialize method.