LogoLogo
  • Getting started
  • Migration guide
  • Test your implementation
  • Release notes
  • AD FORMATS
    • Interstitial
    • Rewarded
    • Small Banner / MREC
    • Thumbnail
  • Privacy
    • Privacy compliance
    • Apple privacy survey
  • HELP
    • Help center
Powered by GitBook
On this page
  • Prerequisites
  • Step 1: Register your application
  • Step 2: Import the Ogury SDK
  • Step 3: Configure your application
  • Step 4: Initialize the Ogury SDK
  • Step 5: Integrate Ogury ad formats
  • Before going live

Was this helpful?

Getting started

Last updated 7 months ago

Was this helpful?

This documentation will guide you through all the steps needed to display Ogury ads on the iOS platform.

Prerequisites

  • Xcode version: 15 or later.

  • Target iOS version: 12 or later.

Step 1: Register your application

  • .

  • and .

The asset key follows the format: OGY-XXXXXXXXXXXX, where X represents an uppercase letter or digit. In the code samples provided, we will use the placeholder string OGY-XXXXXXXXXXXX to refer to this asset key.

Step 2: Import the Ogury SDK

To import the latest version of the Ogury SDK into your project:

  • Open your application's Podfile.

  • Add the following line to your target:

pod 'OgurySdk'

For details on the latest Ogury SDK release, please refer to the .

Step 3: Configure your application

In your project's Build Settings, make the following changes:

  • Add the -ObjC flag to the Other Linker Flags section.

Step 4: Initialize the Ogury SDK

When using a Consent Management Platform (CMP), it is recommended to wait for the CMP to establish the consent status before initializing the Ogury SDK.

When your app is registered and the Ogury SDK is imported, initialize it by calling Ogury.start() before accessing any Ogury SDK functionalities.

Ogury.start(with: "OGY-XXXXXXXXXXXX") { success, error in
    guard error == nil, success else {
        // handle error here
        return
    }
    // handle start here
}
[Ogury startWith:@"OGY-XXXXXXXXXXXX" completionHandler:^(BOOL success, OguryError * _Nullable error) {
    if (error) {
        // handle the error
    } else if (success) {
        // handle start here
    }
}];

Though optional, the StartCompletionBlock is recommended. It provides callbacks for successful initialization or errors. If initialization fails, the listener returns an OguryError with an error code and localizedDescription, helping you troubleshoot. The possible errors are defined in the OguryStartErrorCode enum for easy reference.

OguryStartErrorCode

Enum value
Description

ModuleMissing

The SDK could not be started because a required SDK module is missing.

ModuleFailedToStart

The SDK could not be started because one of the required SDK modules failed to start.

Step 5: Integrate Ogury ad formats

Ogury offers four distinct ad formats. You can refer to the following sections to proceed with the integration:

Before going live

The start method requires the Ogury asset key associated with your app. If you have not an asset key yet, please refer to the to create one.

Ogury is part of the IAB initiative to fight inventory fraud for applications. It is recommended that you file to include Ogury.

Interstitial
Rewarded
Small Banner / MREC
Thumbnail
Authorized Sellers for Apps
update your app-ads.txt
first step
release notes
Log into your Ogury's publisher platform
Register your application
save your asset key