Mediaverse SDK is available for integration via CocoaPods dependency manager and direct download of the compiled framework.
Note: If the CocoaPods dependency manager has already been integrated into the project, follow the “Get Started” instructions on cocoapods.org.
To add the Mediaverse 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.
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
First, you need to import the core Mediaverse SDK class into the main application class:
import MediafySDK
Then you need to initialize the Mediaverse SDK in the application:didFinishLaunchingWithOptions
method by calling Meidafy.initializeSDK()
method.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Initialize Mediaverse 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 Mediaverse exchange URL for a particular partner.The Mediaverse 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.