Vungle
When using Vungle Mediation, the Vungle SDK can be pre-initialized.
danger
If you implement Vungle SDK initialization, Vungle initialization must be called before the GFP SDK initialization.
Add Vungle Module
If NAMSDK/MediationVungle is listed in the Podfile, the VungleAdsSDK module with MediationVungle and its dependency can be imported.
pod 'NAMSDK/MediationVungle' # Vungle
Import the Vungle module to use the Vungle SDK.
- Swift
- Objective-C
import VungleAdsSDK
@import VungleAdsSDK;
Initialize
An example of Vungle initialization is shown below.
- Swift
- Objective-C
VungleAds.initWithAppId("Your App ID") { error in
if let error = error {
//TODO: Error
} else {
//TODO: Success
}
}
[VungleAds initWithAppId:@"Your App ID" completion:^(NSError * _Nullable error) {
if(error) {
//TODO: Error
} else {
//TODO: Success
}
}];