(iOS 2.0) Common Required Procedure

This documentation provides a guideline of common required procedure for BuzzAd Benefit SDK integration and setting of the user information.

The items included in this procedure must be implemented regardless of the type/number of ad placements.

 

Please check the following checklist:

app_id for integration
SDK version to be integrated

Please contact Buzzvil’s BD Manager if you need assistance with the above items.

 

Please refer to the sample code about the actual implementation: Github Sample code (link)

 

 


Integration

1. SDK Integration

SDK integration can be done using Cocoapods or via manual import. (It is recommended to use Cocoapods.)

Using Cocoapods (recommended)

Add the following line in Podfile.

pod 'BuzzAdBenefit', '~> 2.0.0'

Depending on the Deployment Target, the following version should be used:

  • 2.1.11 : Deployment Target 9.0

  • 2.1.12 : Deployment Target 10.0

Manual Import

Manual import is NOT recommended. Please contact a Buzzvil representative if the circumstance is inevitable.

[1] Adding frameworks to the project

Via [Project] > [General] > [Embedded Binaries], add the following frameworks:

  • BuzzAdBenefit Framework

    • BuzzAdBenefit.framework

    • BuzzAdBenefitNative.framework

    • BuzzAdBenefitInterstitial.framework (for interstitial type)

    • BuzzAdBenefitFeed.framework (for feed type)

  • The following can be downloaded from the Dependencies folder of the Github repository (link):

    • AFNetworking.framework

    • SDWebImage.framework

    • SDWebImageWebPCoder.framework

    • ReactiveObjC.framework

    • GoogleAds-IMA-iOS-SDK

[2] Adding Run script

Via [Project] > [Build Phases], click + button then add a New Run Script Phase to paste the script provided below. This process is required to remove the unnecessary architecture in the binary resulted from building a universal framework.

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK; do FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" EXTRACTED_ARCHS=() for ARCH in $ARCHS; do echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME" lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH" EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH") done echo "Merging extracted architectures: ${ARCHS}" lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}" rm "${EXTRACTED_ARCHS[@]}" echo "Replacing original executable with thinned version" rm "$FRAMEWORK_EXECUTABLE_PATH" mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH" done

 

 

SDK Initialization

[1] Insert app_id in place of YOUR_APP_ID

// Objective-C BABConfig *config = [[BABConfig alloc] initWithAppId:YOUR_APP_ID]; [BuzzAdBenefit initializeWithConfig:config];

We recommend adding the above code to AppDelegate's application:didFinishLaunchingWithOptions. If for some reason (internal policy, etc.) the code cannot be applied to the next location, it must be placed before the location where the advertisement is initially requested.

 

 


Integration

2. Managing User Information

Setting the User Profile

User ID and targeting information (gender, birth year) is necessary for the proper functioning of BuzzAd Benefit. Ads are served only after the setUserProfile method is called.

[1] userId (required)

  • A unique identifier assigned to each user

Please consult with the BD manager if there is a possibility of userId changing.
(e.g. userId changes when a user reinstalls the app after deletion)

[2] Targeting Information (recommended)

  • gender

    • BABUserGenderMale

    • BABUserGenderFemale

  • birthYear

 

Using the AppTrackingTransparency Framework

For iOS 14 or higher, a pop-up can be implement to request permission to track the user and access the device’s advertising identifier. This pop-up is displayed only once for the first time only.

[1] Set shouldShowAppTrackingTransparencyDialog, an argument of setUserProfile, as true.

[2] The message displayed to the user in the permission pop-up can be set by adding the NSUserTrackingUsageDescription value to the app's info.plist file.

[3] Able to use an additional feature to allow App Tracking Transparency permission. More information can be found here.



SKAdNetwork Setting

Need to support for Apple’s SKAdNetwork to track conversions for action-type ads on iOS14 or later. BuzzAd SDK supports SKAdNetwork. By adding Buzzvil’s SKAdNetwork Identifier( 67369282zy.skadnetwork) at info.plist , you could able to use conversion tracking feature. For more information on SKAdNetwork, please check Apple’s official documentation.



Setting the NotificationCenter

Once session key registration is complete after setting the UserProfile, BABSessionRegisteredNotification is called. Without the session key, an API key needed to receive ads from the server, the SDK cannot load any ads.

If the time interval between the setting of UserProfile and the ad request is too short, the below procedure is required for session key registration.

 

 

Setting the User Preference

Please set the UserPreference upon a successful user login.

autoplayType: Configures video autoplay mode.

  • BABVideoAutoPlayOnWifi: Video autoplay is enabled only on WiFi (Default)

  • BABVideoAutoPlayEnabled: Video autoplay is enabled

  • BABVideoAutoPlayDisabled: Video autoplay is disabled

 

Removing the User Information

Please remove the UserProfile and the UserPreferences upon user logout or app deletion. 

 


Integration

 

3. (Optional) Sending Action-type Ads

You need to check the following items.

Check if all are completed Integration - [1. SDK Integration], [2. Managing User Information]

This is not required, but optional. If you are not sending action ads, you do not need to apply the items below. In order to send an action-type advertisement, the following items must be applied.

 

When sending out an action-type advertisement, the following items must be applied.

Applying the change of the state of the CTA button (if the advertisement inventory is not customized, it will be automatically applied)
Using the User Inquiry(VOC) page
When using a custom launcher, apply custom in-app browser (applies only if applicable)

 

Applying (changing) the state change of the CTA button

In the case of display ads, it will follow ad impression → ad click → ad accumulation. Since the accumulation is completed after clicking the advertisement, the status of the CTA button will also be changed to 'earning completed' after confirming the accumulation completion callback.

However, in the case of an action type ad (isActionType),

(Previous) Points are earned 'after checking participation, not immediately after clicking the ad. Even if the user returned to the advertisement page after completing the advertisement participation, the status of the CTA button could not be displayed as 'Earning Completed'. Since there was no callback to complete the accumulation, the process was carried out in two steps: Ad impression → Ad click (server accumulation afterward was omitted). The status of the CTA button had to be classified before participation →'Checking participation (is clicked)'.

(New) As for the action type advertisement, the accumulation completion callback is applied the same as the display type advertisement. After confirming the accumulation callback, you need to change the CTA button to ‘Earning completed.’ It can be divided into 3 stages before participation → confirming participation (is clicked) → participation completion (is participated).

For more information, please refer to this document (Handling the UI based on the user’s ad engagement)

 

Use of User Inquiry(VOC: Voice Of Customer) Page

Buzzvil provides higher rewards than display ads when a user completes an action specified in an ad, such as a video, app install, or Facebook page like. If the reward is not paid, the user will send an inquiry. In order to automate the reception and processing of such inquiries, we provide an inquiry web page created in advance in the SDK. You can use the user inquiry page by following the steps below.

The inquiry page can be searched based on the app, not based on the inventory (unit).
We do not force the location of the user inquiry page. It can be placed in any suitable location. 

 

[1] Design a user entry icon and tab for loading the inquiry page.

[2] Call [BuzzAdBenefit showInquiryPageOnViewController:viewController] when the icon or tab is clicked

[+] For Feed and Interstitial, we provide basic icons and functions used for inquiries. (Click below to check.)

  • Feed - If you use the default toolbar without customizing it, the icon and the inquiry function already included as shown in #2 of the image examples are activated.

  • Interstitial - If set showInquiryButton = YES at InterstitialAdConfig, the icon and the inquiry function already included as shown in image example 1 are activated.

 

Apply a custom in-app browser when using a custom launcher

If you are using a custom launcher, you need to implement a custom in-app browser by referring to How to use a custom in-app browser below. (Not applicable for those who are not using the custom launcher.)

If you plan to use a custom launcher, or if you are already using it in version 1.X, the following items must be applied.

 

[1] How to use the custom in-app browser

You can customize the in-app browser used when running ads. For example, loading an ad landing page can be implemented in a class specified by the publisher. (Click below to check)

Notes on implementation:

The in-app browser must be implemented using  ViewController provided by BuzzAdBrowser. If not, some type of ads will not work properly.

[1] Implement CustomBrowserViewController

 

[2] Write a custom launcher class that inherits BABLauncher


[3] Set Launcher at BuzzAdBenefit.

 

[+] How to preliminarily judge if it is advertisements or content

When using a custom launcher, you can determine whether it is an advertisement or content in advance to differentiate the action. (Click below to check.)

 

[+] How to use sourceUrl of Article 

If you register and load a partner's content, you can check the article's sourceUrl to define the action by making it go directly to the app, not by browser landing. (Click below to check.)



 


Additional Information

Troubleshooting Ad Loading Failure

Please check the code property of the BABError object from the callback to understand more about the ad loading failure error.

 

 


Proceed to Next

→ Integration Procedure for Specific Ad Type

- Native (link)
- Feed (link)
- Interstitial (link)