AppsFlyerSDK / AppsFlyerFramework

AppsFlyer Apple SDK
https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS
Other
166 stars 89 forks source link

AppsFlyer SDK v6.0.3 for iOS crash #133

Closed LiubovFedorchuk closed 3 years ago

LiubovFedorchuk commented 3 years ago

Crash appears on call [AppsFlyerLib shared];

Environment: iOS 14.0 iPhone 11 Xcode 12 GM

SDK version: 6.03 (also reproduced with version 6.0.2)

Crash Logs: Thread 1: "+[AFSDKStorageFactory defaultStorage]: unrecognized selector sent to class 0x1277a7560"

LLDB output:

(lldb) po 0x1277a7560
AFSDKStorageFactory
(lldb) image lookup --address 0x1277a7560
      Address: AppsFlyerTracker[0x000000000003f560] (AppsFlyerTracker.__DATA.__objc_data + 920)
      Summary: (void *)0x00000001277a7538: AFSDKStorageFactory
(lldb) image lookup -r -n \+\[AFSDKStorageFactory
1 match found in /.../Frameworks/AppsFlyerTracker.framework/AppsFlyerTracker:
        Address: AppsFlyerTracker[0x00000000000112e0] (AppsFlyerTracker.__TEXT.__text + 42508)
        Summary: AppsFlyerTracker`+[AFSDKStorageFactory storageWithType:]
(lldb) image lookup -r -n defaultStorage AppsFlyerTracker
(lldb) image lookup -r -n storageWithType AppsFlyerTracker
1 match found in /…/Frameworks/AppsFlyerTracker.framework/AppsFlyerTracker:
        Address: AppsFlyerTracker[0x00000000000112e0] (AppsFlyerTracker.__TEXT.__text + 42508)
        Summary: AppsFlyerTracker`+[AFSDKStorageFactory storageWithType:]
af-fess commented 3 years ago

hi @LiubovFedorchuk Does the crash happen in 100% of cases?

From the crash, I see AppsFlyerTracker that already renamed to AppsFlyerLib. Seems like the app is linked twice.

LiubovFedorchuk commented 3 years ago

Hi @af-fess Yes, it's appears each time on app start with the same error. All changed from documentation (migration guide) are applied and all possible cache removed.

af-fess commented 3 years ago

@LiubovFedorchuk please be sure that the old SDK version (< 6) is removed. The AppsFlyerTracker is used in old SDK versions and since we talk about a static framework, might happen some binaries still left.

LiubovFedorchuk commented 3 years ago

Thank you @af-fess! I finally managed to make it work, I found dependency in Carthage/Build folder for AppsFlyerTracker and after removing it everything is working fine.