33 lines
986 B
Plaintext
33 lines
986 B
Plaintext
|
|
//#import <FBSDKCoreKit/FBSDKCoreKit.h>
|
|
//#import <FBAudienceNetwork/FBAdSettings.h>
|
|
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
|
#import <AdSupport/AdSupport.h>
|
|
// #if __has_include(<AppsFlyerLib/AppsFlyerLib.h>)
|
|
// #import <AppsFlyerLib/AppsFlyerLib.h>
|
|
// #else
|
|
// #import "AppsFlyerLib.h"
|
|
// #endif
|
|
|
|
extern "C"
|
|
{
|
|
void IOS_ATTrack() {
|
|
if (@available(iOS 14.5, *)) {
|
|
// [[AppsFlyerLib shared] waitForATTUserAuthorizationWithTimeoutInterval:60];
|
|
|
|
//iOS 14
|
|
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
|
|
UnitySendMessage("AdManager", "Init", "");
|
|
}];
|
|
}else {
|
|
UnitySendMessage("AdManager", "Init", "");
|
|
}
|
|
}
|
|
|
|
const char* IOS_GETIDFA()
|
|
{
|
|
NSString *adId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
|
|
return strdup([adId UTF8String]);
|
|
}
|
|
}
|