Offerwall SDK
1.0.10
1.0.10
  • 👋Welcome to PubScale Offerwall SDK
  • Basic Integration
    • Setting up your app
    • Android Integration
    • React Native
    • Unity
    • Web
    • iOS
    • API
  • 🦉Server-to-Server (S2S) Callback Configuration
  • Sandbox Environment
    • 🩺Sandbox Environment
  • 🔮Samples
  • FAQs
Powered by GitBook
On this page
  • 1. Integration
  • Using SFSafariViewController:
  • 2. Setup Server-to-Server(S2S) callbacks
  • 3. Test the OfferWall

Was this helpful?

  1. Basic Integration

iOS

Offerwalls are in-app ads that incentivize users to take particular actions. In return, the user gets an in-app reward and the developer gets paid by the advertiser.

PreviousWebNextAPI

Last updated 20 days ago

Was this helpful?

1. Integration

Before you start

To set up the PubScale Offerwall, you’ll need to add your app to our platform. Follow this guide for instructions on . Once completed, you will receive a unique 8-digit app ID.

To integrate the PubScale Offerwall, you need to construct a URL and provide a set of parameters for proper configuration.

Construct the Offerwall URL

https://wow.pubscale.com?app_id={app_id}&user_id={user_id}&idfa={idfa}

Parameters

Parameters
Description

app_id (Required)

This is the unique identifier for your app, required for integration.

user_id (Required)

A unique identifier for each user, required to track their activity on the offerwall. We recommend using a UUID as the user_id.

idfa (Optional but Recommended)

For iOS integrations Include the idfa as a parameter when launching the Offerwall. This helps enhance tracking accuracy and plays a key role in fraud prevention.

To integrate the PubScale Offerwall into your iOS App, you have the following options:

Using SFSafariViewController:

For optimal performance and user experience, we recommend launching the Offerwall using SFSafariViewController

Here's a simple Swift example that opens PubScale Offerwall in a SFSafariViewController on iOS

import UIKit
import SafariServices

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        openLinkInSafariViewController()
    }

    func openLinkInSafariViewController() {
        if let url = URL(string: "https://wow.pubscale.com?app_id={app_id}&user_id={user_id}&idfa={idfa}") {
            let safariVC = SFSafariViewController(url: url)
            safariVC.modalPresentationStyle = .formSheet
            present(safariVC, animated: true, completion: nil)
        } else {
            print("Invalid URL")
        }
    }
}

Notes:

  • This code should be placed in a UIViewController subclass.

  • You can call openLinkInSafariViewController() when appropriate (e.g., on a button tap or in viewDidLoad as shown).

  • Don't forget to import SafariServices.

  • Don't forget to replace the {app_id} ,{user_id} and {idfa} with the actula value.

    • Check your App ID and make sure it is correct.

    • If your App ID is correct then its possible your App ID is not approved yet, in that case please reach out to your Account Manager to get your App approved.

2. Setup Server-to-Server(S2S) callbacks

3. Test the OfferWall

To ensure your OfferWall integration is working perfectly, follow these steps during the testing phase.

  • Open the offerwall and verify that all offers are displayed correctly.

  • Complete an offer and confirm that a callback is received from PubScale server to your server. For the sandbox environment, ensure the callback URL is configured properly to receive sandbox callbacks.

  • Ensure the hashing technique used matches the one specified in the documentation.

  • Verify that the reward value received matches the value displayed for the offer.

If your App is not approved from PubScale you might see an error page. If you see this error,

If your configuration is correct, you will see a page similar to the screenshot below.

Set up the Server-to-Server (S2S) callbacks to receive instant updates whenever a user completes an offer and earns a reward. When an offer is completed, our server will send a notification to the configured callback URL. This callback provides the necessary information to process and verify the reward for the user in your application.

Please use the sandbox environment for testing purposes to get instant callbacks and rewards. To learn how to enable the Sandbox environment, .

Confirm that the callback is received only from PubScale's .

Learn more.
click here
whitelisted server IPs
how to set up your app