Audiofy SDK - Integration

Audiofy SDK is available for integration via CocoaPods dependency manager and direct download of the compiled framework.

Cocoapods

Note: If the CocoaPods dependency manager has already been integrated into the project, follow the “Get Started” instructions on cocoapods.org.

To add the Audiofy SDK into your app you should include this line into your Podfile within the application target:

pod 'MeidafySDK', '2.4.5'

Then run pod install --repo-update in the project folder.

Direct download

The Meidafy SDK is also available via a direct download link:

https://sdk-cdn.mediafy.io/ios/mediafy-sdk/2.4.5/MediafySDK.xcframework.zip

SDK Initialization

First, you need to import the core Audiofy SDK class into the main application class:

import MediafySDK

Then you need to initialize the Audiofy SDK in the application:didFinishLaunchingWithOptions method by calling Meidafy.initializeSDK() method.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {   
    
    // Initialize Audiofy SDK.
    Mediafy.initializeSDK(accountSettings: SETTINGS)
    Mediafy.setSubdomain(subdomain: ACCOUNT_SUBDOMAIN)
}

Parameters:

  • accountSettings - provided account parameters string (f.e. "bid=text")
  • subdomain - determine the subdomain of Audiofy exchange URL for a particular partner.

The Audiofy account manager should provide you with both of these keys.

At the application initialization stage, you should also provide additional contextual information that SDK will use in the ad requests. The full list of supported contextual signals is available in the documentation for SDK Global Parameters class.

As soon as SDK is initialized and contextual information is provided, it is ready to request the ads.

+

Contact Us