Firstborn/Library/PackageCache/com.unity.ads@3.7.5/Plugins/iOS/UnityMonetizationNativeProm...

37 lines
1.4 KiB
Mathematica
Raw Normal View History

2023-03-28 13:24:16 -04:00
#import <UnityAds/UnityMonetization.h>
#import "UnityJsonAdditions.h"
const void* UnityMonetizationCreateNativePromoAdapter(const void* pPlacementContent) {
if (pPlacementContent) {
UMONPromoAdPlacementContent* placementContent = (__bridge UMONPromoAdPlacementContent*)pPlacementContent;
UMONNativePromoAdapter* adapter = [[UMONNativePromoAdapter alloc] initWithPromo:placementContent];
return CFBridgingRetain(adapter);
}
return NULL;
}
void UnityMonetizationReleaseNativePromoAdapter(const void* pPlacementContent) {
CFBridgingRelease(pPlacementContent);
}
void UnityMonetizationNativePromoAdapterOnShown(const void* pNativePromoAdapter, int showType) {
if (pNativePromoAdapter) {
UMONNativePromoAdapter* adapter = (__bridge UMONNativePromoAdapter*)pNativePromoAdapter;
[adapter promoDidShow:(UMONNativePromoShowType)showType];
}
}
void UnityMonetizationNativePromoAdapterOnClicked(const void* pNativePromoAdapter) {
if (pNativePromoAdapter) {
UMONNativePromoAdapter* adapter = (__bridge UMONNativePromoAdapter*)pNativePromoAdapter;
[adapter promoDidClick];
}
}
void UnityMonetizationNativePromoAdapterOnClosed(const void* pNativePromoAdapter) {
if (pNativePromoAdapter) {
UMONNativePromoAdapter* adapter = (__bridge UMONNativePromoAdapter*)pNativePromoAdapter;
[adapter promoDidClose];
}
}