[M] AF ad Rvenenue , max Ad
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// AppsFlyerAdRevenueWrapper.h
|
||||
// Unity-iPhone
|
||||
//
|
||||
// Created by Jonathan Wesfield on 01/12/2019.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if __has_include(<AppsFlyerAdRevenue/AppsFlyerAdRevenue.h>)
|
||||
#import <AppsFlyerAdRevenue/AppsFlyerAdRevenue.h>
|
||||
#endif
|
||||
|
||||
@interface AppsFlyerAdRevenueWrapper : NSObject
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fa891a95d71c459daa1e92ee7a653ab
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// AppsFlyerAdRevenueWrapper.mm
|
||||
// Unity-iPhone
|
||||
//
|
||||
// Created by Jonathan Wesfield on 25/11/2019.
|
||||
//
|
||||
|
||||
#import "AppsFlyerAdRevenueWrapper.h"
|
||||
|
||||
|
||||
@implementation AppsFlyerAdRevenueWrapper
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
NSString* stringFromChar(const char *str) {
|
||||
return str ? [NSString stringWithUTF8String:str] : nil;
|
||||
}
|
||||
|
||||
NSDictionary* dictionaryFromJson(const char *jsonString) {
|
||||
if(jsonString){
|
||||
NSData *jsonData = [[NSData alloc] initWithBytes:jsonString length:strlen(jsonString)];
|
||||
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:nil];
|
||||
return dictionary;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
const void _start(int length, int* adRevenueTypes){
|
||||
[AppsFlyerAdRevenue start];
|
||||
}
|
||||
const void _setIsDebugAdrevenue(bool isDebug){
|
||||
[[AppsFlyerAdRevenue shared] setIsDebug:isDebug];
|
||||
}
|
||||
|
||||
const void _logAdRevenue(const char* monetizationNetwork,
|
||||
int mediationNetwork,
|
||||
double eventRevenue,
|
||||
const char* revenueCurrency,
|
||||
const char* additionalParameters){
|
||||
[[AppsFlyerAdRevenue shared] logAdRevenueWithMonetizationNetwork:stringFromChar(monetizationNetwork)
|
||||
mediationNetwork:(AppsFlyerAdRevenueMediationNetworkType) mediationNetwork
|
||||
eventRevenue:[NSNumber numberWithDouble:eventRevenue]
|
||||
revenueCurrency:stringFromChar(revenueCurrency)
|
||||
additionalParameters:dictionaryFromJson(additionalParameters)];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,37 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84d99cf0f930e4c80b4bc1858e042b70
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1 @@
|
||||
import Foundation
|
||||
@@ -0,0 +1,37 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a631431c30cca4ac2bb4b40fc67e4005
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
tvOS: tvOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user