@@ -99,21 +99,21 @@ std::string AppsFlyerX::currencyCode() {
9999#endif
100100}
101101
102- void AppsFlyerX::disableAppleAdSupportTracking (bool isDisableAppleAdSupportTracking ) {
102+ void AppsFlyerX::disableAdvertisingIdentifier (bool shouldDisable ) {
103103#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
104104 // Not supported for Android
105- CCLOGWARN (" %s" , " disableAppleAdSupportTracking is not supported for Android." );
105+ CCLOGWARN (" %s" , " disableAdvertiserIdentifier is not supported for Android." );
106106#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
107- return AppsFlyerXApple::disableAppleAdSupportTracking (isDisableAppleAdSupportTracking );
107+ return AppsFlyerXApple::disableAdvertisingIdentifier (shouldDisable );
108108#endif
109109}
110110
111- bool AppsFlyerX::isDisableAppleAdSupportTracking () {
111+ bool AppsFlyerX::isDisabledAdvertisingIdentifier () {
112112#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
113113 // Not supported for Android
114- CCLOGWARN (" %s" , " isDisableAppleAdSupportTracking is not supported for Android." );
114+ CCLOGWARN (" %s" , " isDisabledAdvertiserIdentifier is not supported for Android." );
115115#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
116- return AppsFlyerXApple::isDisableAppleAdSupportTracking ();
116+ return AppsFlyerXApple::isDisabledAdvertisingIdentifier ();
117117#endif
118118}
119119
@@ -175,38 +175,38 @@ std::string AppsFlyerX::appInviteOneLinkID() {
175175#endif
176176}
177177
178- void AppsFlyerX::deviceTrackingDisabled (bool deviceTrackingDisabled ) {
178+ void AppsFlyerX::anonymizeUser (bool shouldAnonymize ) {
179179#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
180- AppsFlyerXAndroid::deviceTrackingDisabled (deviceTrackingDisabled );
180+ AppsFlyerXAndroid::anonymizeUser (shouldAnonymize );
181181#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
182- return AppsFlyerXApple::deviceTrackingDisabled (deviceTrackingDisabled );
182+ return AppsFlyerXApple::anonymizeUser (shouldAnonymize );
183183#endif
184184}
185185
186- bool AppsFlyerX::isDeviceTrackingDisabled () {
186+ bool AppsFlyerX::isAnonymizedUser () {
187187#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
188188 // Not supported for Android
189- CCLOGWARN (" %s" , " isDeviceTrackingDisabled is not supported for Android." );
189+ CCLOGWARN (" %s" , " isAnonymizedUser is not supported for Android." );
190190#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
191- return AppsFlyerXApple::isDeviceTrackingDisabled ();
191+ return AppsFlyerXApple::isAnonymizedUser ();
192192#endif
193193}
194194
195- void AppsFlyerX::disableIAdTracking (bool disableIAdTracking ) {
195+ void AppsFlyerX::disableCollectASA (bool shouldDisable ) {
196196#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
197197 // Not supported for Android
198- CCLOGWARN (" %s" , " disableIAdTracking is not supported for Android." );
198+ CCLOGWARN (" %s" , " disableCollectASA is not supported for Android." );
199199#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
200- return AppsFlyerXApple::disableIAdTracking (disableIAdTracking );
200+ return AppsFlyerXApple::setDisableCollectASA (shouldDisable );
201201#endif
202202}
203203
204- bool AppsFlyerX::isDisableIAdTracking () {
204+ bool AppsFlyerX::isDisabledCollectASA () {
205205#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
206206 // Not supported for Android
207- CCLOGWARN (" %s" , " isDisableIAdTracking is not supported for Android." );
207+ CCLOGWARN (" %s" , " isDisabledCollectASA is not supported for Android." );
208208#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
209- return AppsFlyerXApple::isDisableIAdTracking ();
209+ return AppsFlyerXApple::isDisabledCollectASA ();
210210#endif
211211}
212212
@@ -273,31 +273,23 @@ void AppsFlyerX::setUserEmails(std::vector<std::string> userEmails, EmailCryptTy
273273#endif
274274}
275275
276- void AppsFlyerX::trackAppLaunch () {
276+ void AppsFlyerX::start () {
277277#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
278- AppsFlyerXAndroid::startTracking ();
278+ AppsFlyerXAndroid::start ();
279279#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
280- AppsFlyerXApple::trackAppLaunch ();
280+ AppsFlyerXApple::start ();
281281#endif
282282}
283283
284- void AppsFlyerX::trackEvent (const std::string& eventName, const std::string& value ) {
284+ void AppsFlyerX::logEvent (const std::string& eventName, cocos2d::ValueMap values ) {
285285#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
286- AppsFlyerXAndroid::trackEvent (eventName, value );
286+ AppsFlyerXAndroid::logEvent (eventName, values );
287287#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
288- AppsFlyerXApple::trackEvent (eventName, value );
288+ AppsFlyerXApple::logEvent (eventName, values );
289289#endif
290290}
291291
292- void AppsFlyerX::trackEvent (const std::string& eventName, cocos2d::ValueMap values) {
293- #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
294- AppsFlyerXAndroid::trackEvent (eventName, values);
295- #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
296- AppsFlyerXApple::trackEvent (eventName, values);
297- #endif
298- }
299-
300- void AppsFlyerX::validateAndTrackInAppPurchase (const std::string& productIdentifier,
292+ void AppsFlyerX::validateAndLogInAppPurchase (const std::string& productIdentifier,
301293 const std::string& price,
302294 const std::string& currency,
303295 const std::string& tranactionId,
@@ -306,28 +298,28 @@ void AppsFlyerX::validateAndTrackInAppPurchase(const std::string& productIdentif
306298 std::function<void(cocos2d::ValueMap)> failureBlock) {
307299#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
308300 // Not supported for Android
309- CCLOGWARN (" %s" , " validateAndTrackInAppPurchase is not supported for Android." );
301+ CCLOGWARN (" %s" , " validateAndLogInAppPurchase is not supported for Android." );
310302#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
311303
312- AppsFlyerXApple::validateAndTrackInAppPurchase (productIdentifier, price, currency, tranactionId, params, [&](cocos2d::ValueMap result) {
304+ AppsFlyerXApple::validateAndLogInAppPurchase (productIdentifier, price, currency, tranactionId, params, [&](cocos2d::ValueMap result) {
313305 successBlock (result);
314306 }, [&] (cocos2d::ValueMap error) {
315307 successBlock (error);
316308 });
317309#endif
318310}
319311
320- void AppsFlyerX::validateAndTrackInAppPurchase (const std::string& publicKey,
312+ void AppsFlyerX::validateAndLogInAppPurchase (const std::string& publicKey,
321313 const std::string& signature,
322314 const std::string& purchaseData,
323315 const std::string& price,
324316 const std::string& currency,
325317 cocos2d::ValueMap additionalParameters){
326318#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
327- AppsFlyerXAndroid::validateAndTrackInAppPurchase (publicKey, signature, purchaseData, price, currency, additionalParameters);
319+ AppsFlyerXAndroid::validateAndLogInAppPurchase (publicKey, signature, purchaseData, price, currency, additionalParameters);
328320#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
329321 // Not supported for iOS
330- CCLOGWARN (" %s" , " validateAndTrackInAppPurchase (const std::string& publicKey, const std::string& signature, const std::string& purchaseData, const std::string& price, const std::string& currency, cocos2d::ValueMap additionalParameters) is not supported for Android." );
322+ CCLOGWARN (" %s" , " validateAndLogInAppPurchase (const std::string& publicKey, const std::string& signature, const std::string& purchaseData, const std::string& price, const std::string& currency, cocos2d::ValueMap additionalParameters) is not supported for Android." );
331323#endif
332324}
333325
@@ -340,7 +332,6 @@ std::string AppsFlyerX::getAppsFlyerUID() {
340332#endif
341333}
342334
343- // - (void) loadConversionDataWithDelegate:(id<AppsFlyerTrackerDelegate>) delegate __attribute__((deprecated));
344335
345336void AppsFlyerX::handleOpenURL (const std::string& url, const std::string& sourceApplication) {
346337#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
@@ -476,26 +467,71 @@ void AppsFlyerX::setOnAppOpenAttributionFailure(void(*callback)(cocos2d::ValueMa
476467}
477468
478469
479- void AppsFlyerX::stopTracking (bool stopTracking ) {
470+ void AppsFlyerX::stop (bool shouldStop ) {
480471#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
481- AppsFlyerXAndroid::stopTracking (stopTracking );
472+ AppsFlyerXAndroid::stop (shouldStop );
482473#elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
483- return AppsFlyerXApple::stopTracking (stopTracking );
474+ return AppsFlyerXApple::stop (shouldStop );
484475#endif
485476}
486477
487478void AppsFlyerX::sharingFilter (std::vector<std::string> partners){
488- #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
479+ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
489480 AppsFlyerXAndroid::sharingFilter (partners);
490- #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
491- return AppsFlyerXApple::sharingFilter (partners);
492- #endif
481+ #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
482+ return AppsFlyerXApple::sharingFilter (partners);
483+ #endif
493484}
494485
495486void AppsFlyerX::sharingFilterForAllPartners (){
496- #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
487+ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
497488 AppsFlyerXAndroid::sharingFilterForAllPartners ();
498- #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
499- return AppsFlyerXApple::sharingFilterForAllPartners ();
500- #endif
489+ #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
490+ return AppsFlyerXApple::sharingFilterForAllPartners ();
491+ #endif
492+ }
493+
494+ void AppsFlyerX::logLocation (double longitude, double latitude){
495+ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
496+
497+ #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
498+ return AppsFlyerXApple::logLocation (longitude, latitude);
499+ #endif
500+ }
501+
502+ void AppsFlyerX::disableSKAdNetwork (bool shouldDisable){
503+ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
504+ // not supported for Android
505+ CCLOGWARN (" %s" , " disableSKAdNetwork is not supported for Android." );
506+ #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
507+ return AppsFlyerXApple::disableSKAdNetwork (shouldDisable);
508+ #endif
509+ }
510+
511+ bool AppsFlyerX::isDisabledSKAdNetwork (){
512+ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
513+ // not supported for Android
514+ CCLOGWARN (" %s" , " isDisabledSKAdNetwork is not supported for Android." );
515+ #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
516+ return AppsFlyerXApple::isDisabledSKAdNetwork ();
517+ #endif
518+ }
519+
520+ void AppsFlyerX::waitForATTUserAuthorizationWithTimeoutInterval (double timeoutInterval){
521+ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
522+ // not supported for Android
523+ CCLOGWARN (" %s" , " waitForATTUserAuthorizationWithTimeoutInterval is not supported for Android." );
524+ #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
525+ return AppsFlyerXApple::waitForATTUserAuthorizationWithTimeoutInterval (timeoutInterval);
526+ #endif
527+ }
528+
529+
530+ void AppsFlyerX::setPhoneNumber (const std::string& phoneNumber){
531+ #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
532+ // not supported for Android
533+ CCLOGWARN (" %s" , " setPhoneNumber is not supported for Android." );
534+ #elif (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
535+ return AppsFlyerXApple::setPhoneNumber (phoneNumber);
536+ #endif
501537}
0 commit comments