Git Product home page Git Product logo

appsflyer-unity-plugin's Introduction

appsflyer-unity-plugin

License: MIT GitHub tag Unit tests check packages

🛠 In order for us to provide optimal support, we would kindly ask you to submit any issues to [email protected]

When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , production steps, logs, code snippets and any additional relevant information.

📖 The Unity documentation also be found here

  • Android AppsFlyer SDK v6.14.0
  • iOS AppsFlyer SDK v6.14.3

In v6.8.0 of the AppsFlyer SDK, we added the normal permission com.google.android.gms.permission.AD_ID to the SDK's AndroidManifest, to allow the SDK to collect the Android Advertising ID on apps targeting API 33. If your app is targeting children, you need to revoke this permission to comply with Google's Data policy. You can read more about it here.


  • Starting from version 6.12.20, we have changed the way we distribute the plugin via UPM. The UPM branches will no longer hold a dependency for com.google.external-dependency-manager as it was proved to cause issues in different versions of Unity - to be clear, this dependency is still required to utilize our plugin, we just can't distribute the plugin with it in UPM form as the EDM4U dependency is not available via UPM for quite a while already but is still available via .unitypackage or .tgz files, if you use UPM to fetch our plugin - please download a suitable version of EDM4U so you will be able to resolve the dependencies, or opt for an installation without EDM4U.

  • Starting version 6.6.0, there is no more need to differentiate between iOS and Android APIs. All APIs must be called with AppsFlyer class (even if the API is only iOS or Android).
  • Please take into consideration that since version 6.6.0, most of the APIs require initSDK to be called prior to using them, and since version 6.10.10 only a handful of APIs will properly work when called prior to initialization: setIsDebug, setCurrencyCode, setHost, disableSKAdNetwork.

Example:

Before 6.6.0:

#if UNITY_IOS && !UNITY_EDITOR
    AppsFlyeriOS.waitForATTUserAuthorizationWithTimeoutInterval(60);
#endif

After 6.6.0:

#if UNITY_IOS && !UNITY_EDITOR
    AppsFlyer.waitForATTUserAuthorizationWithTimeoutInterval(60);
#endif

  • 6.3.0 supports Universal Windows Platform. As part of this update, the AppsFlyerObjectScript changes to include the app_id for your UWP app. If you made changes to this file, please merge them with the new AppsFlyerObjectScript. Please also note that you can leave the uwp app id field empty.

  • From version 6.3.0, we use xcframework for iOS platform, then you need to use cocoapods version >= 1.10

Migrating from the old plugin? (version V4)
View the migration docs here.

⚠️ There are breaking changes when migrating to Unity v5. This includes new API, different class/package names, and the removal of com.appsflyer.GetDeepLinkingActivity.

The plugin supports a Strict Mode which completely removes the IDFA collection functionality and AdSupport framework dependencies. Use the Strict Mode when developing apps for kids, for example. More information about how to install the Strict Mode is available here.



appsflyer-unity-plugin's People

Contributors

af-do avatar af-fess avatar af-margot avatar af-vero avatar andr-ggn avatar dori-af avatar embermark avatar gilmor-af avatar gm-appsflyer avatar liaz-af avatar maximesavardfrima avatar natanadigit avatar natiad-af avatar pazlavi avatar sokoloff06 avatar sp-jordi-vilalta avatar wesfieldj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appsflyer-unity-plugin's Issues

Android compatibility warning "StrictMode policy violation"

After update sdk to version 5.1.1 and (also for 5.3.0) we got Android compatibility warnings in google play console Pre-launch reports.

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList;
	at android.os.StrictMode.lambda$static$1(StrictMode.java:407)
	at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
	at java.lang.Class.getDeclaredField(Native Method)
	at com.appsflyer.internal.a.<clinit>(:3708)
	at com.appsflyer.internal.a.ǃ(Unknown Source:0)
	at com.appsflyer.AppsFlyerLibCore$c.run(:3343)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at com.appsflyer.AFExecutor$1$3.run(:31)
	at java.lang.Thread.run(Thread.java:919)
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ldalvik/system/DexPathList;->nativeLibraryDirectories:Ljava/util/List;
	at android.os.StrictMode.lambda$static$1(StrictMode.java:407)
	at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
	at java.lang.Class.getDeclaredField(Native Method)
	at com.appsflyer.internal.a.<clinit>(:3714)
	at com.appsflyer.internal.a.ǃ(Unknown Source:0)
	at com.appsflyer.AppsFlyerLibCore$c.run(:3343)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at com.appsflyer.AFExecutor$1$3.run(:31)
	at java.lang.Thread.run(Thread.java:919)
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Ldalvik/system/DexPathList;->nativeLibraryPathElements:[Ldalvik/system/DexPathList$NativeLibraryElement;
	at android.os.StrictMode.lambda$static$1(StrictMode.java:407)
	at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
	at java.lang.Class.getDeclaredField(Native Method)
	at com.appsflyer.internal.a.<clinit>(:3717)
	at com.appsflyer.internal.a.ǃ(Unknown Source:0)
	at com.appsflyer.AppsFlyerLibCore$c.run(:3343)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at com.appsflyer.AFExecutor$1$3.run(:31)
	at java.lang.Thread.run(Thread.java:919)
StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Landroid/app/ActivityThread;->currentApplication()Landroid/app/Application;
	at android.os.StrictMode.lambda$static$1(StrictMode.java:407)
	at android.os.-$$Lambda$StrictMode$lu9ekkHJ2HMz0jd3F8K8MnhenxQ.accept(Unknown Source:2)
	at java.lang.Class.getDeclaredMethodInternal(Native Method)
	at java.lang.Class.getPublicMethodRecursive(Class.java:2079)
	at java.lang.Class.getMethod(Class.java:2066)
	at java.lang.Class.getMethod(Class.java:1693)
	at com.appsflyer.internal.a.<clinit>(:1773)
	at com.appsflyer.internal.a.ǃ(Unknown Source:0)
	at com.appsflyer.AppsFlyerLibCore$c.run(:3343)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at com.appsflyer.AFExecutor$1$3.run(:31)
	at java.lang.Thread.run(Thread.java:919)

Regards,
Dmitry

Appsflyer 6.0.1 behavior changed

Hi! I have a question about new version. In the changes I see this method
'AppsFlyeriOS.waitForAdvertisingIdentifierWithTimeoutInterval'

Does the method postpone Appsflyer initialization for timeout?
Thanks!

Unity SDK v6: Non-Organic tracking does not cause non-organic

I was integrating the Unity SDK v6.0.1 Beta and noticed that non-organic tests were returning organic as the source when following these instructions:
https://support.appsflyer.com/hc/en-us/articles/360011451918-iOS-SDK-V6-beta-integration-guide-for-developers#integration-43-simulate-a-nonorganic-install
The clicks were properly registered and I can see it in my dashboard.
I Installed the SDK patch build via XCode as per instructions on production configurations.

Tested on XCode 11.6 & XCode 12.0 Beta 3 and neither properly registered the user as non-organic.
There are no Unity specific instructions atm.

Side note, checked for this as well but the prompt still did not trigger, nor did my install trigger as non-organic. #31

Device had iOS 14 Public Beta

AppsFlyer 6.1.3 manifest conflicts with Vungle network

This manifest is created dynamically during the build, so I have no control other that. Is there a way to fix it on your side?

Manifest merger failed : Attribute application@fullBackupContent value=(@xml/vungle_backup_rule) from [com.vungle:publisher-sdk-android:6.8.0] AndroidManifest.xml:20:9-60
is also present at [com.appsflyer:af-android-sdk:6.1.3] AndroidManifest.xml:16:18-73 value=(@xml/appsflyer_backup_rules).
Suggestion: add 'tools:replace="android:fullBackupContent"' to element at AndroidManifest.xml:5:3-126 to override.

[Unity - iOS] Facebook Login cannot complete with present of AppsFlyerSDK

[Condition]
Facebook SDK for Unity v8.0.0
AppsFlyer SDK for Unity v6.0.3
Unity 2019.4.6f1
iOS device (tested on iOS 14.0.1)

[Step to reproduce]

  1. Create a unity project
  2. Import and setup Facebook SDK for login
  3. Import AppsFlyer SDK
  4. Build project and run on iOS device
  5. Do the login with Facebook. The main app will enter background mode, Facebook app appears.
  6. After the login, the main app returns to foreground and sticks there because Facebook login pop up does not close.
  • The behavior is similar to this clip. (This clip not mine. I get it on internet)

[Temporary Fix]
Facebook SDK works normally when I:
Option 1: Remove AppsFlyer SDK
Option 2: Downgrade to AppsFlyer SDK v5.4.2

GUIDs change with updates

Hi, when updating AppsFlyer to a newer version (6.2.2 => 6.2.41), all GUIDs change for all C# scripts and the AppsFlyerObject prefab. This might be a problem especially with references in Unity.

I noticed this must happen due to your top-level .gitignore that ignores .meta files. This should not happen with updates and it also messes up our commits with lots of unnecessary changes. The correct approach is to commit .meta files and to avoid having to re-generate these in every project folder.

My suggestion is for you to stop ignoring .meta files and commit them in this public repo.

Thanks!

What does `tokenSent` variable do in your guide

In iOS guide: https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/blob/master/docs/Guides.md#-ios

You have the following code:

using AppsFlyerSDK;
using Unity.Notifications.iOS;

public class AppsFlyerObjectScript : MonoBehaviour, IAppsFlyerConversionData
{
    private bool tokenSent; // THIS VARIABLE IS ALWAYS FALSE

    void Start()
    {
        AppsFlyer.initSDK("devKey", "appID", this);
        AppsFlyer.startSDK();
#if UNITY_IOS
  
        StartCoroutine(RequestAuthorization());
        Screen.orientation = ScreenOrientation.Portrait;

#endif

    }


#if UNITY_IOS
    IEnumerator RequestAuthorization()
    {
      
        using (var req = new AuthorizationRequest(AuthorizationOption.Alert | AuthorizationOption.Badge, true))
        {

            while (!req.IsFinished)
            {
                yield return null;
            }
            if (!tokenSent)
            {
                if (req.Granted && req.DeviceToken != "")
                {
                    AppsFlyeriOS.registerUninstall(Encoding.UTF8.GetBytes(req.DeviceToken));
      
                }
            }
        }
    }
#endif
}

When should I set tokenSent to true?

Problem With v6.0.1 - beta

I'm using xcode Version 12.0 beta 6 (12A8189n) and pod version 1.9.3, there are two errors happens now

  1. AppsFlyeriOSWrapper.mm:60:31: Property 'deviceLoggingDisabled' not found on object of type 'AppsFlyerLib *'
    2)AppsFlyeriOSWrapper.mm:92:32: No visible @interface for 'AppsFlyerLib' declares the selector 'logLocationEvent:latitude:'
    it was perfectly working yesterday , i updated the ironsource it requires to update pod then i update pod then this happen my pod version is 1.9.3 ,and when pod install its download Installing Beta-AppsFlyerFramework (6.0.2.174) is this the issue ?

Empty game object name

Hi! Our team faced an issue - an empty game object name. Here is the fix
`
const void _validateAndSendInAppPurchase (const char* productIdentifier, const char* price, const char* currency, const char* tranactionId, const char* additionalParameters, const char* objectName) {

    validateObjectName = stringFromChar(objectName);

    [[AppsFlyerTracker sharedTracker]
     validateAndTrackInAppPurchase:stringFromChar(productIdentifier)
     price:stringFromChar(price)
     currency:stringFromChar(currency)
     transactionId:stringFromChar(tranactionId)
     additionalParameters:dictionaryFromJson(additionalParameters)
     success:^(NSDictionary *result){
             unityCallBack(validateObjectName, VALIDATE_CALLBACK, stringFromdictionary(result));
     } failure:^(NSError *error, id response) {
             unityCallBack(validateObjectName, VALIDATE_ERROR_CALLBACK, error ? [[error localizedDescription] UTF8String] : "error");
     }];
}

const void _generateUserInviteLink (const char* parameters, const char* objectName) {

	validateObjectName = stringFromChar(objectName);	

    [AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:^AppsFlyerLinkGenerator * _Nonnull(AppsFlyerLinkGenerator * _Nonnull generator) {
        return generatorFromDictionary(dictionaryFromJson(parameters), generator);
    } completionHandler:^(NSURL * _Nullable url) {
        unityCallBack(validateObjectName, GENERATE_LINK_CALLBACK, [url.absoluteString UTF8String]);
    }];
}`

Instead of
`const void _attributeAndOpenStore (const char* appID, const char* campaign, const char* parameters, const char* objectName) {
[AppsFlyerCrossPromotionHelper
trackAndOpenStore:stringFromChar(appID)
campaign:stringFromChar(campaign)
paramters:dictionaryFromJson(parameters)
openStore:^(NSURLSession * _Nonnull urlSession, NSURL * _Nonnull clickURL) {
unityCallBack(stringFromChar(objectName), OPEN_STORE_LINK_CALLBACK, [clickURL.absoluteString UTF8String]);

     }];
}

const void _generateUserInviteLink (const char* parameters, const char* objectName) {
[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:^AppsFlyerLinkGenerator * _Nonnull(AppsFlyerLinkGenerator * _Nonnull generator) {
return generatorFromDictionary(dictionaryFromJson(parameters), generator);
} completionHandler:^(NSURL * _Nullable url) {
unityCallBack(stringFromChar(objectName), GENERATE_LINK_CALLBACK, [url.absoluteString UTF8String]);
}];
}`

using Proguard with AF in unity fails?

Warning: Exception while processing task java.io.IOException: proguard.ParseException: Expecting class member name before 'ι' in line 27 of file 'C:\Users\etg25.gradle\caches\transforms-1\files-1.1\com.appsflyer.af-android-sdk-6.1.0.aar\f7dc66a21b9e5d977b2094dc7c353f6c\proguard.txt'

Anyone know how to fix this?

Android can't build with Vungle sdk

Manifest merger failed : Attribute application@fullBackupContent value=(@xml/appsflyer_backup_rules) from [com.appsflyer:af-android-sdk:5.3.0] AndroidManifest.xml:14:18-73
is also present at [com.vungle:publisher-sdk-android:6.5.3] AndroidManifest.xml:19:9-60 value=(@xml/vungle_backup_rule).
Suggestion: add 'tools:replace="android:fullBackupContent"' to element at AndroidManifest.xml:4:3-38:17 to override.

install_data response 404

I use this unityplugin (version 6.2.0), android
But the install_data api response 400

'''
{"error_reason": "App ID is incorrect", "status_code": 400}
'''
the api version is v4.0 ,
when I change version to v4 or v3, it response

'''
{"af_status": "Organic", "af_message": "organic install"}
'''

The java api is right?

IDFA Questions

Unity: 2018.4.16 - 2019.4.16
Appsflyer SDK: 6.1.4
Platform: iOS

I have two questions about App Tracking and Appsflyer approach

  • Why we need to set waitForATTUserAuthorizationWithTimeoutInterval to 60 or 120?
    I've tried waiting after that minute and advertiserId is being collected correctly, so I don't understand why this time.

  • Why a timer? I found it really strange to set a time according on "how long the user will take to answer". Why not a callback requesting the idfa or a simple setAdvertisingId method?

OnAppOpenAttribution Issue

OnAppOpenAttribution method is still not being called if the app is in kill state. If the app is open or it is in foreground state, this method gets called though. Because of this, the OneLink feature is broken.

Appsflyer on iOS prevents from others to receive the openUrl notifications

AppsFlyerAppController.mm has the following code which restricts from others to receive the openUrl notifications

-(BOOL) application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options {
    NSLog(@"got openUrl: %@",url);\n
    [[AppsFlyerLib shared] handleOpenUrl:url options:options];\n
    return YES;
}

the probable fix would be to call the superclass method so that others who registered for the notification can also receive it

-(BOOL) application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options {
    NSLog(@"got openUrl: %@",url);
    [super application:application openURL:url options:options];
    [[AppsFlyerLib shared] handleOpenUrl:url options:options];
    return YES;
}

Wrong app open data on the first launch

Hi! After updating to SDK version 5.4.1 from 4.18.0 we faced an issue - for the first launch we receive open app data
{ "install_time": "2020-07-27 14:06:22.830", "media_source": "restricted", "agency": null, "retargeting_conversion_type": "none", "af_siteid": null, "af_status": "Non-organic", "is_first_launch": true, "af_sub1": null, "af_sub5": null, "click_time": null, "af_sub4": null, "af_sub3": null, "af_sub2": null, "http_referrer": null, "campaign": null, "af_channel": null, "campaign_id": null }

After reinstall
{ "redirect_response_data": null, "adgroup_id": null, "engmnt_source": null, "retargeting_conversion_type": "none", "orig_cost": "0.0", "is_first_launch": true, "af_click_lookback": "7d", "af_cpi": null, "iscache": true, "click_time": "2020-07-27 13:03:03.887", "is_branded_link": null, "match_type": "fingerprinting", "af_referrer_uid": "1595850286616-819367868486402837", "adset": null, "campaign_id": null, "shortlink": "b9c6fbdc", "install_time": "2020-07-27 13:03:13.544", "media_source": "af_app_invites", "AppInvitePublicPlayeId": "5c6c415e3b00b90bfc778c2f", "agency": null, "af_siteid": "out_game", "af_status": "Non-organic", "af_sub1": null, "cost_cents_USD": "0", "af_sub5": null, "af_sub4": null, "af_sub3": null, "af_sub2": null, "adset_id": null, "esp_name": null, "campaign": "None", "http_referrer": null, "is_universal_link": null, "adgroup": null }

In the previous version, we received the second JSON on the first request. What was changed?

Thanks!

AppTrackingTransparency pop-up never shows up

After following the readme provided, we get the following error log on trying to invoke the iOS ATT confirmation pop-up:

[DEBUG] AppsFlyer: [SKAd] Timeout exceded. sk_exp = 0.000000

This c# code gets executed on Unity's side:
AppsFlyer.initSDK(IOSAppsFlyerKkey, IOSAppId, this); if (new Version(Device.systemVersion) .CompareTo(new Version("14.0")) >= 0) { AppsFlyeriOS.waitForAdvertisingIdentifierWithTimeoutInterval(60); } AppsFlyer.startSDK();

This is the modified AppsFlyerAppController.mm "didFinishLaunching" snippet:
`

  • (void)didFinishLaunching:(NSNotification*)notification {
    if (@available(iOS 14, *)) {
    [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status){
    }];
    }
    NSLog(@"got didFinishLaunching = %@",notification.userInfo);
    if (notification.userInfo[@"url"]) {
    [self onOpenURL:notification];
    }
    }
    `

"Didn't find class "com.appsflyer.AppsFlyerLib" error was reported after upgraded to version 6.2.3 #159

I need to upgraded appsflyer sdk to version 6.2.3 and got this error:
AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.appsflyer.AppsFlyerLib" on path: DexPathList[[zip file "/data/app/~~FvFWLvnrVtldkS2_TMEW8g==/com.uxin.live.overseas-FBcwFccULnUTK2Px3ww7kw==/base.apk"],nativeLibraryDirectories=...

my code is below.
build.gradle:
dependencies {
implementation 'com.appsflyer:af-android-sdk:6.2.3'
implementation 'com.android.installreferrer:installreferrer:1.0'
}

proguard.cfg:
-dontwarn com.android.installreferrer
-keep class com.appsflyer.** { *; }

and the initialization part is the same as the official recommendation.Now I have no solution to the problem,so I will be very grateful for any help!

OneLink custom link is not opening the App when its installed

Plugin Version

AppsFlyer SDK Version 6.2.5

On what Platform are you having the issue?

iOS

What did you do?

  1. Have the game installed
  2. Follow a deeplink on iOS

What did you expect to happen?

Deeplink should take user to the installed app

What happened instead?

Deeplink takes user to the App Store

Please provide any other relevant information.

  • Unity version: 2019.4.19f
  • Unity 2018 works as expected on iOS
  • Android works as expected

Conflict with Google Firebase on iOS

After I implemented this we are no longer able to get a fully working iOS build. I'm running Unity 2020.1.10f1

Here's some of the exceptions I'm seeing.

TypeLoadException: Could not resolve type with token 01000036 (from typeref, class/assembly Google.EditorInitializer, Google.VersionHandlerImpl, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.Editor.XcodeProjectPatcher' threw an exception.
System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0)
System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) (at <9577ac7a62ef43179789031239ba8798>:0)
System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) (at <9577ac7a62ef43179789031239ba8798>:0)
System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) (at <9577ac7a62ef43179789031239ba8798>:0)
System.Activator.CreateInstance (System.Type type) (at <9577ac7a62ef43179789031239ba8798>:0)
UnityEditor.AssetPostprocessingInternal.GetAudioProcessorsHashString () (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:590)
UnityEditor.AssetPostprocessingInternal:GetAudioProcessorsHashString() (at /Users/bokken/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:606)

Questions regarding IAP Transaction

I'm following your guides so I have two questions:

1

You provided following code

      string price = args.purchasedProduct.metadata.localizedPrice.ToString();

This will return different results based on locale ex: 1.99 or 1,99 depending on locale.
Does appsflyer normalize this value?

2

        string receipt = args.purchasedProduct.receipt;
        var recptToJSON = (Dictionary<string, object>)AFMiniJSON.Json.Deserialize(args.purchasedProduct.receipt);
        var transactionID = (string)recptToJSON["TransactionID"];

I was just using

     string transactionId = args.purchasedProduct.transactionID;

Do we really need to deserialize json string and read from it? Any issues with single-line above?

Thanks

Installreferrer-1.0 cause Duplicated Classes

Nowadays having .aar files of native stuff embebed in unity project can cause duplicated classes since facebook and firebase uses the resolver to resolve dependencies.

One of them is facebook using com.android.installreferrer:installreferrer:1.0 and the embeded appsflyer Installreferrer-1.0.aar.

I recommend deleting it from the source code and using one of two options:
1- Be part of the resolver adding an AppsFlyerDependencies.xml
2- Put in the readme file that devs should add implementation com.android.installreferrer:installreferrer:1.0 in the mainTemplate.gradle

App crashes with restorationHandler

Hi! We have an issue in a game - we use Appboy and Appsflyer. We use merged controller, and after opening the game from appsflyer generated link we got a crash
Screen Shot 2020-07-24 at 11 36 03

We didn't receive the crash on previous versions AF SDK, because we didn't have super call
0691a13#diff-634bfcf211bafb405b063f342663175f

Could you please check - is it safe to remove this call? What is it for?

Recieving Error in 6.0.1_beta branch

Unity Editor Version: 2018.3.9f1
Platform: Android

After updating to the 6.0.1_beta (using EDM4U) branch in one of our titles i am seeing the following error:

08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: Exception in sendRequestToServer.
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: java.io.FileNotFoundException: https://conversions.appsflyer.com/api/v5.4/androidevent?app_id=**com.k**&buildnumber=5.4.1
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:251)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:26)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at com.safedk.android.internal.partials.AppsFlyerNetworkBridge.httpUrlConnectionGetResponseCode(AppsFlyerSourceFile:141)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at com.appsflyer.AppsFlyerLibCore.ι(:3005)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at com.appsflyer.AppsFlyerLibCore.ı(:50928)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at com.appsflyer.AppsFlyerLibCore$a.run(:3375)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at com.appsflyer.AFExecutor$1$1.run(:31)
08-14 10:25:34.052 11867 12601 E AppsFlyer_5.4.1: at java.lang.Thread.run(Thread.java:764)
08-14 10:25:34.053 11867 12601 I AppsFlyer_5.4.1: failed to send requeset to server. https://conversions.appsflyer.com/api/v5.4/androidevent?app_id=**com.k**&buildnumber=5.4.1

Support UPM package

I guess it's time to start delivering the plugin through Unity Package Manager. This would be really useful/easy for devs.

java.lang.ClassNotFoundException: com.google.android.gms.ads.identifier.AdvertisingIdClient

At the start of initializing Appsflyer I am getting error:

E/AppsFlyer_5.3.0: com.google.android.gms.ads.identifier.AdvertisingIdClient
    java.lang.ClassNotFoundException: com.google.android.gms.ads.identifier.AdvertisingIdClient
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:324)
        at java.lang.Class.forName(Class.java:285)
        at com.appsflyer.internal.z.ɩ(:70)
        at com.appsflyer.AppsFlyerLibCore.ı(:1754)
        at com.appsflyer.AppsFlyerLibCore.Ι(:1588)
        at com.appsflyer.AppsFlyerLibCore.ι(:93)
        at com.appsflyer.AppsFlyerLibCore$b.run(:3284)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at com.appsflyer.AFExecutor$1$3.run(:31)
        at java.lang.Thread.run(Thread.java:818)

May be its a good idea to add this dependency to AppsFlyerDependencies.xml config file?

[Appsflyer 6.2.3] Can't open the game iOS

Hello.

I integrated appsflyer lastest version ( 6.2.3 ) into my game.
If i open the game and turn off internet connection in game then restart the game. i tap on icon but game is not opened. I have tried attach to xCode but still can't open the game. I have to uninstall then reinstall the build to make it work.

i tested with version 6.2.2 same results.

I attached log from xCode below. Please help me. Thank

2021-03-09 16:56:51.492821+0700 games[6549:1500850] [DYMTLInitPlatform] platform initialization successful
AppsFlyer SDK version 6.2.2 started build (64);
2021-03-09 16:56:51.581934+0700 games[6549:1500533] UnityIAP UnityEarlyTransactionObserver: Created
2021-03-09 16:56:51.582929+0700 games[6549:1500533] UnityIAP UnityEarlyTransactionObserver: Registered for lifecycle events
2021-03-09 16:56:51.584698+0700 games[6549:1500533] System version: 120408
2021-03-09 16:56:51.643264+0700 games[6549:1500833] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x283fddb60, domain=1, instance=1>
Keychain items migration status: 0
(lldb)

image_2021_03_10T03_22_57_206Z

[Question] Ask for IDFA permission

Hi, I have one question about showing the pop up that allow user to give or not permission to the app to track idfa.

Is appsflyer giving a method to call it or we should call it by ourself?

Thanks

Android, v5 EDM4U - ClassNotFoundException: com.bun.miitmdid.core.JLibrary

After adding the latest SDK(v5 using EDM4U) I get the following error after every launched AppsFlyer event.

I/AppsFlyerOaid5.4.0: Fetch
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bun/miitmdid/core/JLibrary;
        at com.appsflyer.oaid.OaidClient.fetchMsa(OaidClient.java:76)
        at com.appsflyer.oaid.OaidClient.fetch(OaidClient.java:64)
        at com.appsflyer.AppsFlyerLibCore.ɩ(:50602)
        at com.appsflyer.AppsFlyerLibCore.Ι(:1603)
        at com.appsflyer.AppsFlyerLibCore.ι(:99)
        at com.appsflyer.AppsFlyerLibCore$e.run(:3307)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at com.appsflyer.AFExecutor$1$1.run(:31)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.bun.miitmdid.core.JLibrary" on path: DexPathList
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.appsflyer.oaid.OaidClient.fetchMsa(OaidClient.java:76) 
        at com.appsflyer.oaid.OaidClient.fetch(OaidClient.java:64) 
        at com.appsflyer.AppsFlyerLibCore.ɩ(:50602) 
        at com.appsflyer.AppsFlyerLibCore.Ι(:1603) 
        at com.appsflyer.AppsFlyerLibCore.ι(:99) 
        at com.appsflyer.AppsFlyerLibCore$e.run(:3307) 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
        at com.appsflyer.AFExecutor$1$1.run(:31) 
        at java.lang.Thread.run(Thread.java:764) 

ios is issue!

Crashed: com.apple.main-thread
0 bubbleshooter 0x104c0c96c CrashedCheckBelowForHintsWhy + 118 (CrashReporter.mm:118)
1 bubbleshooter 0x1069ad780 -[AppsFlyerTracker getEventParameters:].cold.1 + 4330837888
2 bubbleshooter 0x104cf45ec RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017_RuntimeObject_RuntimeObject(void ()(), MethodInfo const, void*, void**) + 32880 (Il2CppInvokerTable.cpp:32880)
3 bubbleshooter 0x105c546b0 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 539 (Runtime.cpp:539)
4 bubbleshooter 0x105c54fec il2cpp::vm::Runtime::CallUnhandledExceptionDelegate(Il2CppDomain*, Il2CppDelegate*, Il2CppException*) + 476 (Runtime.cpp:476)
5 bubbleshooter 0x105c54f7c il2cpp::vm::Runtime::UnhandledException(Il2CppException*) + 632 (Runtime.cpp:632)
6 bubbleshooter 0x105663708 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 362 (ScriptingInvocation.cpp:362)
7 bubbleshooter 0x10566b000 Coroutine::InvokeMoveNext(ScriptingExceptionPtr*) + 233 (Coroutine.cpp:233)
8 bubbleshooter 0x10566abdc Coroutine::Run(bool*) + 257 (Coroutine.cpp:257)
9 bubbleshooter 0x1055034d4 DelayedCallManager::Update(int) + 181 (CallDelayed.cpp:181)
10 bubbleshooter 0x1055c4668 ExecutePlayerLoop(NativePlayerLoopSystem*) + 347 (PlayerLoop.cpp:347)
11 bubbleshooter 0x1055c469c ExecutePlayerLoop(NativePlayerLoopSystem*) + 365 (PlayerLoop.cpp:365)
12 bubbleshooter 0x1055c4874 PlayerLoop() + 45 (RecursionLimit.h:45)
13 bubbleshooter 0x1058486e4 UnityPlayerLoopImpl(bool) + 271 (LibEntryPoint.mm:271)
14 bubbleshooter 0x104c03754 UnityRepaint + 280 (UnityAppController+Rendering.mm:280)
15 bubbleshooter 0x104c03630 -[UnityAppController(Rendering) repaintDisplayLink] + 72 (UnityAppController+Rendering.mm:72)
16 QuartzCore 0x183bca748 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 664
17 QuartzCore 0x183ca1244 display_timer_callback(__CFMachPort*, void*, long, void*) + 280
18 CoreFoundation 0x18090bce4 __CFMachPortPerform + 176
19 CoreFoundation 0x180930098 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 60
20 CoreFoundation 0x18092f440 __CFRunLoopDoSource1 + 596
21 CoreFoundation 0x180929320 __CFRunLoopRun + 2360
22 CoreFoundation 0x1809284bc CFRunLoopRunSpecific + 600
23 GraphicsServices 0x19743a820 GSEventRunModal + 164
24 UIKitCore 0x1832d5164 -[UIApplication _run] + 1072
25 UIKitCore 0x1832da840 UIApplicationMain + 168
26 bubbleshooter 0x104bfb390 main + 41 (main.mm:41)
27 libdyld.dylib 0x1805efe40 start + 4

ClassNotFoundException: Didn't find class "com.bun.supplier.IIdentifierListener"

SDK version : unity 5.4.2
Unity Version : 2018.4.14f4

Error when using af-android-sdk:5.4.1
af-android-sdk:5.3.0 is fine.

07-23 13:13:15.427 21578 21643 D AppsFlyer_5.4.1: Initializing AppsFlyer SDK: (v5.4.1.44): com..game.
07-23 13:13:15.432 21578 21643 I AppsFlyer_5.4.1: Starting AppsFlyer Tracking: (v5.4.1.44): com.
.game.
07-23 13:13:15.433 21578 21643 I AppsFlyer_5.4.1: Build Number: 44: com..game.
07-23 13:13:15.433 21578 21643 D AppsFlyer_5.4.1: Loading properties..: com.
.game.
07-23 13:13:15.434 21578 21643 D AppsFlyer_5.4.1: Done loading properties: true: com..game.
07-23 13:13:15.436 21578 21643 I AppsFlyer_5.4.1: appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data: com.
.game.
07-23 13:13:15.438 21578 21990 I AppsFlyer_5.4.1: onBecameForeground: com..game.
07-23 13:13:15.440 21578 21990 I AppsFlyer_5.4.1: Sending first launch for this session!: com.
.game.
07-23 13:13:15.592 21578 21991 I AppsFlyer_5.4.1: sendTrackingWithEvent from activity: android.app.Application: com..game.
07-23 13:13:15.594 21578 21991 I AppsFlyer_5.4.1: Trying to fetch GAID..: com.
.game.
07-23 13:13:15.704 21578 21991 I AppsFlyer_5.4.1: ******* sendTrackingWithEvent: Launch: com..game.
07-23 13:13:15.722 21578 21991 W AppsFlyer_5.4.1: Exception while collecting facebook's attribution ID. : com.
.game.
07-23 13:13:15.728 21578 21991 I AppsFlyer_5.4.1: IMEI was not collected.: com..game.
07-23 13:13:15.733 21578 21991 I AppsFlyer_5.4.1: Android ID was not collected.: com.
.game.
07-23 13:13:15.741 21578 21991 I art : Rejecting re-init on previously-failed class java.lang.Class<com.appsflyer.oaid.OaidClient$1>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bun/supplier/IIdentifierListener;: com..game.
07-23 13:13:15.741 21578 21991 I art : at java.util.Map com.appsflyer.AppsFlyerLibCore.?(com.appsflyer.AFEvent) (:50600): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void com.appsflyer.AppsFlyerLibCore.Ι(com.appsflyer.AFEvent) (:1603): com..game.
07-23 13:13:15.741 21578 21991 I art : at void com.appsflyer.AppsFlyerLibCore.ι(com.appsflyer.AppsFlyerLibCore, com.appsflyer.AFEvent) (:99): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void com.appsflyer.AppsFlyerLibCore$e.run() (:3307): com..game.
07-23 13:13:15.741 21578 21991 I art : at java.lang.Object java.util.concurrent.Executors$RunnableAdapter.call() (Executors.java:428): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void java.util.concurrent.FutureTask.run() (FutureTask.java:237): com..game.
07-23 13:13:15.741 21578 21991 I art : at void java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run() (ScheduledThreadPoolExecutor.java:272): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1133): com..game.
07-23 13:13:15.741 21578 21991 I art : at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:607): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void com.appsflyer.AFExecutor$1$1.run() (:31): com..game.
07-23 13:13:15.741 21578 21991 I art : at void java.lang.Thread.run() (Thread.java:761): com.
.game.
07-23 13:13:15.741 21578 21991 I art : Caused by: java.lang.ClassNotFoundException: Didn't find class "com.bun.supplier.IIdentifierListener" on path: DexPathList[[zip file "/data/app/com..game.-1/base.apk"],nativeLibraryDirectories=[/data/app/com..game.-1/lib/arm, /data/app/com..game.-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]: com..game.
07-23 13:13:15.741 21578 21991 I art : at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56): com..game.
07-23 13:13:15.741 21578 21991 I art : at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312): com..game.
07-23 13:13:15.741 21578 21991 I art : at java.util.Map com.appsflyer.AppsFlyerLibCore.?(com.appsflyer.AFEvent) (:50600): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void com.appsflyer.AppsFlyerLibCore.Ι(com.appsflyer.AFEvent) (:1603): com..game.
07-23 13:13:15.741 21578 21991 I art : at void com.appsflyer.AppsFlyerLibCore.ι(com.appsflyer.AppsFlyerLibCore, com.appsflyer.AFEvent) (:99): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void com.appsflyer.AppsFlyerLibCore$e.run() (:3307): com..game.
07-23 13:13:15.741 21578 21991 I art : at java.lang.Object java.util.concurrent.Executors$RunnableAdapter.call() (Executors.java:428): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void java.util.concurrent.FutureTask.run() (FutureTask.java:237): com..game.
07-23 13:13:15.741 21578 21991 I art : at void java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run() (ScheduledThreadPoolExecutor.java:272): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1133): com..game.
07-23 13:13:15.741 21578 21991 I art : at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:607): com.
.game.
07-23 13:13:15.741 21578 21991 I art : at void com.appsflyer.AFExecutor$1$1.run() (:31): com..game.
07-23 13:13:15.741 21578 21991 I art : at void java.lang.Thread.run() (Thread.java:761): com.
.game.
07-23 13:13:15.741 21578 21991 I art : : com.***.game.

android:fullBackupContent build issue when using custom backup rules

We use android:fullBackupContent="@xml/my_backup_rules" as a workaround for unity related crashes when the app is installed from a backup (Google Drive etc).

Is there a proper way to integrate the backups needed by AppsFlyer?
I will try to use override in the main manifest next.

Here are our my_backup_rules.xml:

<full-backup-content>
    <!-- Explicitly including files to backup because of crash with restored Unity "il2cpp" folder.
         Using "exclude" in any way does not prevent "il2cpp" from being restored (equals app crash).
         Combining "include" "." and "exclude" "il2cpp" does not prevent the restore of "il2cpp".
         Using only "include" does prevent a restore of "il2cpp". -->
    <include domain="sharedpref" path="."/>
</full-backup-content>

Crashlytics reporting AFSDK-related crashes since update to 6.2.3

Hi there,

It seems that after updating our application to version 6.2.3 of the plugin, we've started receiving an uptick in EXC_BAD_ACCESS KERN_INVALID_ADDRESS crashes. Example crash log, as reported on Firebase, is as follows:

0x10320b7d4 CrashReporting::CrashReporter::SendReport(CrashReporting::CrashReport&) + 935 (UnityWebRequestProto.h:935)
 0x10320aec4 CrashReporting::CrashReporter::HandleLog(core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, core::basic_string<char, core::StringStorageDefault<char> > const&, LogType) + 324 (CrashReporter.cpp:324)
0x10320aba0 CrashReporting::CrashReporter::OnLogCallbackStatic(DebugStringToFileData const&, LogType, bool) + 191 (String.h:191)
0x10364f9c8 CallbackArray3<DebugStringToFileData const&, LogType, bool>::Invoke(DebugStringToFileData const&, LogType, bool) + 405 (CallbackArray.h:405)
0x10364f658 DebugStringToFilePostprocessedStacktrace(DebugStringToFileData const&) + 1006 (LogAssert.cpp:1006)
0x1034cbc64 Scripting::LogException(ScriptingExceptionPtr, int, char const*, bool) + 819 (Scripting.cpp:819)
0x1057486f4 -[AFSDKEvent sign].cold.1 + 4415653620
0x105748604 -[AFSDKEvent sign].cold.1 + 4415653380
0x10598f840 -[AFSDKEvent sign].cold.1 + 4418041920
0x102ebdca8 RuntimeInvoker_TrueVoid_t22962CB4C05B1D89B55A6E1139F0E87A90987017_RuntimeObject_RuntimeObject(void (*)(), MethodInfo const*, void*, void**) + 68625 (Il2CppInvokerTable.cpp:68625)
0x103aa4a6c il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 584 (Runtime.cpp:584)
0x103aa53a4 il2cpp::vm::Runtime::CallUnhandledExceptionDelegate(Il2CppDomain*, Il2CppDelegate*, Il2CppException*) + 521 (Runtime.cpp:521)
0x103aa5330 il2cpp::vm::Runtime::UnhandledException(Il2CppException*) + 677 (Runtime.cpp:677)
 0x103a73ebc il2cpp::icalls::mscorlib::System::Threading::ThreadStart(void*) + 169 (Thread.cpp:169)
0x103a7c8f8 il2cpp::os::Thread::RunWrapper(void*) + 174 (Thread.cpp:174)
0x103a7eab4 il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 106 (ThreadImpl.cpp:106)
 0x1d5bbbcb0 _pthread_start + 320
0x1d5bc4778 thread_start + 8

I'm unsure as to what would be causing this. We did upgrade from an older (<6.0) version of the SDK, and I followed the SDK initialization/migration instructions to the best of my ability. For the time being, we've decided to release a new version of the app with the SDK rolled back pending resolution of this issue.

As far as I can tell, the only difference is that we call the initSDK(devKey, appID) function statically from a manager class, without having an actual gameObject with the AppsFlyer script attached, but I'm not sure that that would cause this. Any insight would be appreciated.

AppsFlyerObjectScript needs to call DontDestroyOnLoad?

In the v5 integration guide https://support.appsflyer.com/hc/en-us/articles/360007314277-Unity-plugin-V5-integration-guide-for-developers#integration-32-initialize-the-plugin I notice this line "Note: Make sure not to call destroy on the game object."
So the game object with the script AppsFlyerObjectScript needs to persist through every scene in the game, right? But in the example code, I don't see the function DontDestroyOnLoad() gets called. This will leads to the object with this script getting destroyed when Unity load a new scene.

Unity SDK v6: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bun/miitmdid/core/JLibrary

Hello, we have just tried upgrading our AppsFlyer SDK to v6.0.1_beta and got the following errors:

2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 java.util.concurrent.TimeoutException
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at java.util.concurrent.FutureTask.get(FutureTask.java:206)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at com.appsflyer.internal.ContentFetcher.get(:45)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at com.appsflyer.internal.ac.ɩ(:22)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at com.appsflyer.AppsFlyerLibCore.getAttributionId(:2872)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at com.appsflyer.AppsFlyerLibCore.ɩ(:1964)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at com.appsflyer.AppsFlyerLibCore.Ι(:1603)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at com.appsflyer.AppsFlyerLibCore.ι(:99)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at com.appsflyer.AppsFlyerLibCore$e.run(:3307)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at com.appsflyer.AFExecutor$1$1.run(:31)
2020/08/24 12:56:24.979 14843 15002 Error AppsFlyer_5.4.1 	at java.lang.Thread.run(Thread.java:764)
2020/08/24 12:56:24.984 14843 15002 Info AppsFlyer_5.4.1 IMEI was not collected.
2020/08/24 12:56:24.987 14843 15002 Info AppsFlyer_5.4.1 Android ID was not collected.
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 Fetch
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bun/miitmdid/core/JLibrary;
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at com.appsflyer.oaid.OaidClient.fetchMsa(OaidClient.java:76)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at com.appsflyer.oaid.OaidClient.fetch(OaidClient.java:64)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at com.appsflyer.AppsFlyerLibCore.ɩ(:50602)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at com.appsflyer.AppsFlyerLibCore.Ι(:1603)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at com.appsflyer.AppsFlyerLibCore.ι(:99)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at com.appsflyer.AppsFlyerLibCore$e.run(:3307)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at com.appsflyer.AFExecutor$1$1.run(:31)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at java.lang.Thread.run(Thread.java:764)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 Caused by: java.lang.ClassNotFoundException: Didn't find class "com.bun.miitmdid.core.JLibrary" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.plotkids.monicatv-rPIwGPmx8v6LtE2wJcsW8w==/base.apk"],nativeLibraryDirectories=[/data/app/com.plotkids.monicatv-rPIwGPmx8v6LtE2wJcsW8w==/lib/arm64, /data/app/com.plotkids.monicatv-rPIwGPmx8v6LtE2wJcsW8w==/base.apk!/lib/arm64-v8a, /system/lib64]]
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:171)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
2020/08/24 12:56:24.993 14843 15002 Info AppsFlyerOaid5.4.0 	... 13 more
2020/08/24 12:56:25.009 14843 15002 Info AppsFlyer_5.4.1 AppsFlyer: first launch date: 2020-08-24_145541+0000
2020/08/24 12:56:25.016 14843 15002 Warn AppsFlyer_5.4.1 Cannot verify existence of our InstanceID Listener Service in the manifest. Please refer to documentation.
2020/08/24 12:56:25.018 14843 15002 Debug AppsFlyer_5.4.1 didConfigureTokenRefreshService=false
2020/08/24 12:56:25.023 14843 15002 Debug AppsFlyer_5.4.1 No deep link detected

We have tried adding -keep class com.bun.miitmdid.** { *; } to our proguard-user.txt file but it didn't work.

The onConversionDataSuccess method marks all installations from Facebook Ads as "Organic" (iOS)

Hello!
There was a problem that all users who installed the application after clicking on Facebook ads are marked as Organic by the onConversionDataSuccess method. Everything is working correctly in the dashboard, I can see all Non-Organic installs correctly. The problem is only at the SDK level.

Also if I use SDK Integration test in dashboard everything works correctly and SDK sends Non-organic install.

I am using Unity 2019.4.17f1, AppsFlyer SDK version is 6.2.3.

Tell me, please, what could be the matter? Thank you in advance!

AppsFlyerObject.prefab can't import to scene

Unable to instantiate prefab. Prefab may be broken.
UnityEditorInternal.InternalEditorUtility:HierarchyWindowDrag()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Unity version : 2018.2.21f
Appsflyer unity plugin version : 5.2.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.