Comment ça marche ?
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 Formats publicitaires to see how to do it with each format.
Qu'est-ce qu'il faut ?
-
Commencez par créer un compte chez nous. Contactez-nous pour initier le processus et fournir toutes les informations nécessaires énumérées ci-dessous.
-
Add the emballage/trigger (transitions ou 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.
-
Utiliser
RefineryAdFactoryto display the ads.
-
-
Votre application est maintenant prête pour la monétisation avec nous.
Informations dont nous avons besoin concernant votre application
-
Quels formats comptez-vous utiliser ? Si vous n'êtes pas sûr des formats, veuillez vous référer à leur pages dédiées ou contactez-nous pour de l'aide nous contacter.
-
Lien du magasin (Google ou Pomme une).
-
Domain of the app. E.g: www.refinery89.com
-
(Optional) Desired App Keywords.
Exemples
At the end of the example, you can find a modèle de production ici.
Si vous êtes en mode Debug, veuillez ajouter ces lignes avant tous les exemples. Marquer le SDK comme Debug fera en sorte que le SDK utilise les identifiants et les données de ConfigBuilder.
R89SDK.shared.setLogLevel(level: LogLevels.debug)
R89SDK.shared.setDebug(getLocalFakeData: true,
forceCMP: true,
useProductionAuctionServer: false)
L'exemple dans la démo
Le ligneUnique drapeau est réglé à false. Use the RefineryAdFactory to create and place the ADs in a UIView.
R89SDK.shared.initialize(publisherId: “TestRefinery89ID”,
appId: “TestConfigDemoApp”,
singleLine: false,
publisherInitializationEvents: nil)
Modèle
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 et 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.