Git Product home page Git Product logo

appsflyerframework's Introduction

AppsFlyerFramework

Version Carthage Compatible SPM Compatible

Table Of Contents

  1. Cocoapods
  2. Swift Package Manager
  3. Carthage
  4. Integration
  5. Support

In order to install AppsFlyerLib framework via Cocoapods, you should choose the binary version, that you require, add it to your Podfile and run pod install/update:

# For statically linked library
pod 'AppsFlyerFramework'

# For dynamically linked library
pod 'AppsFlyerFramework/Dynamic'

# For Strict (No IDFA colection) library
pod 'AppsFlyerFramework/Strict'

For more reference on using Cocoapods, please click here

  1. Add a Swift Package File

    • In your Xcode project, go to File > Swift Packages > Add Package Dependency.
  2. Enter Package Repository URL

    • In the dialog that appears, enter the URL of the repository that hosts the AppsFlyerFramework package:
     # For statically linked library
     https://github.com/AppsFlyerSDK/AppsFlyerFramework-Static
    
     # For dynamically linked library
     https://github.com/AppsFlyerSDK/AppsFlyerFramework-Dynamic
    
     # For Strict (No IDFA colection) library
     https://github.com/AppsFlyerSDK/AppsFlyerFramework-Strict

Note: Three separated repositories for SPM support versions 6.12.0 and higher. For versions lower than 6.12.0, please, use our main AppsFlyerFramework repository URL.

  1. Select fetched package
  2. Click on the Next button to proceed and choose the target, which should be using the dependency
  3. Integrate Package

In order to fetch AppsFlyerLib artifacts using Carthage, please use binary-only method, described here. All necessary JSON files with links to the binary artifacts are located in Carthage folder in the root of the repository.

In order to get instruction on how to integrate AppsFlyer iOS SDK please visit the following page - iOS SDK.

Release Notes can be found here.

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 , reproduction steps, logs, code snippets and any additional relevant information.

appsflyerframework's People

Contributors

af-fess avatar af-obodovskyi avatar amit-kremer93 avatar andr-ggn avatar cbowns avatar coeur avatar mathaeus avatar pablolerma avatar pushp1989 avatar pyrou avatar rkrim 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  avatar  avatar  avatar  avatar  avatar

appsflyerframework's Issues

Installing AppsFlyer-SDK 4.5.11 (was 4.5.10)

Hi Guys, You have an issue with your podspec repo.

We have updated pods today and have downloaded your 4.5.11 release, the following has been noticed:

  1. 4.5.11 doesn't exist in the releases documentation
  2. 4.5.10 which we had installed is no longer downloadable so had to revert to 4.5.9
  3. The 4.5.11 build has severe issues, in that the header file and lib are zipped into file.zip!

Can you check this all out before others have issues.

Thanks

App Crashes on Open

App get frequently crashes on launch
We are using AppsFlyer iOS SDK 4.6.4 with Objective-C

After adding AppsFlyer App keep going crash
Here is a Log we got on crashlytics.
Crashed: com.af.sdk
0 CoreMedia 0x10906f5e9 (Missing)
1 CoreMedia 0x106e63dcb (Missing)
2 CoreMedia 0x106d8bf2c (Missing)
3 CoreMedia 0x106d8bdc8 (Missing)
4 CoreMedia 0x106e520dc (Missing)
5 CoreMedia 0x106e65702 (Missing)
6 CoreMedia 0x106e64f09 (Missing)
7 CoreMedia 0x106e655b8 (Missing)
8 CoreMedia 0x106e52054 (Missing)
9 Foundation 0x10279a796 -[NSUserDefaults(NSUserDefaults) synchronize] + 42
10 App 0x100fd5097 -[AppsFlyerTracker getTimePassedSinceLastLaunch] + 333
11 App 0x100fd5ccb -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 3098
12 App 0x100fd4cb6 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 74
13 CoreMedia 0x10908512e (Missing)
14 CoreMedia 0x10906897e (Missing)
15 CoreMedia 0x109079779 (Missing)
16 CoreMedia 0x1090725a5 (Missing)
17 CoreMedia 0x10906a2cb (Missing)
18 CoreMedia 0x10906ac9f (Missing)
19 CoreMedia 0x10906b047 (Missing)
20 CoreMedia 0x10906c9dc (Missing)
21 CoreMedia 0x10906c782 (Missing)
22 CoreMedia 0x10942b4de (Missing)
23 CoreMedia 0x109429341 (Missing)

screen-shot-2017-02-14-at-2 59 37-pm

Better changelog

I just open this issue so the AppsFlyers's developers could modify the current and future releases so we can know what is getting fixed/done in every release.

Of course the changelog in the comments of your support wiki it is far from enough for a developer looking for what changed in that specific version.

The SDK is expecting a non-null value in a dictionary and crashes

From our Crashlytics crash reports:

# Crashlytics - plaintext stacktrace downloaded by Ben Sarrazin at Wed, 21 Dec 2016 17:46:29 GMT
# URL: https://fabric.io/[REDACTED]/ios/apps/com.[REDACTED].[REDACTED]/issues/[REDACTED]/sessions/[REDACTED]
# Organization: [REDACTED]
# Platform: ios
# Application: [REDACTED]
# Version: [REDACTED]
# Bundle Identifier: com.[REDACTED].[REDACTED]
# Issue #: 1353
# Issue ID: [REDACTED]
# Session ID: [REDACTED]
# Date: 2016-12-14T10:06:57Z
# OS Version: 10.1.1 (14B100)
# Device: iPhone 7 Plus
# RAM Free: 9.4%
# Disk Free: 93.2%

#2. Crashed: com.af.sdk
0  libobjc.A.dylib                0x1915980a0 objc_retain + 16
1  CoreFoundation                 0x192a274c4 -[__NSDictionaryM setObject:forKey:] + 200
2  AppsFlyerTracker               0x10115d8c8 -[AppsFlyerKeychainWrapper prepareForKeychain:] + 4312864968
3  AppsFlyerTracker               0x10115d6e0 -[AppsFlyerKeychainWrapper getObject:] + 4312864480
4  AppsFlyerTracker               0x1011659ac -[AppsFlyerTracker getKeychainData] + 4312897964
5  AppsFlyerTracker               0x10116572c -[AppsFlyerTracker setOriginalAppsFlyerIdToKeychainIfNeeded:] + 4312897324
6  AppsFlyerTracker               0x1011656dc -[AppsFlyerTracker getAppsFlyerUID] + 4312897244
7  AppsFlyerTracker               0x1011663d0 -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 4312900560
8  AppsFlyerTracker               0x101165d48 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 4312898888
9  libdispatch.dylib              0x1919d11c0 _dispatch_client_callout + 16
10 libdispatch.dylib              0x1919de008 _dispatch_continuation_pop + 576
11 libdispatch.dylib              0x1919ea648 _dispatch_source_latch_and_call + 204
12 libdispatch.dylib              0x1919d3164 _dispatch_source_invoke + 820
13 libdispatch.dylib              0x1919df278 _dispatch_queue_serial_drain + 468
14 libdispatch.dylib              0x1919d49a8 _dispatch_queue_invoke + 652
15 libdispatch.dylib              0x1919df940 _dispatch_queue_override_invoke + 360
16 libdispatch.dylib              0x1919e138c _dispatch_root_queue_drain + 572
17 libdispatch.dylib              0x1919e10ec _dispatch_worker_thread3 + 124
18 libsystem_pthread.dylib        0x191bda2b8 _pthread_wqthread + 1288
19 libsystem_pthread.dylib        0x191bd9da4 start_wqthread + 4

--

#0. com.apple.main-thread
0  libsystem_kernel.dylib              0x191af816c mach_msg_trap + 8
1  libsystem_kernel.dylib              0x191af7fdc mach_msg + 72
2  libxpc.dylib                        0x191c2cfd4 xpc_pipe_routine + 236
3  libxpc.dylib                        0x191c1fa18 _xpc_interface_routine + 172
4  libxpc.dylib                        0x191c27b28 _xpc_bootstrap_services + 120
5  libxpc.dylib                        0x191c1bc08 _xpc_dyld_image_callback + 272
6  AsyncImageView                      0x101084bf0 (Missing)
7  AsyncImageView                      0x10108e2b4 (Missing)
8  AsyncImageView                      0x10108502c (Missing)
9  AsyncImageView                      0x10108a64c (Missing)
10 libdispatch.dylib                   0x191a01d5c (Missing)
11 libMobileGestaltExtensions.dylib    0x1abd2f2d0 (null) + 732
12 libMobileGestalt.dylib              0x192e2e7e8 (null) + 320
13 libMobileGestalt.dylib              0x192e2dc10 (null) + 284
14 SpringBoardFoundation               0x19dcdd6bc -[UIDevice(ControlCenter) _deviceInfoForKey:] + 20
15 UIKit                               0x198e5f104 -[UIDevice name] + 32
16 AppsFlyerTracker                    0x101166564 -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 4312900964
17 AppsFlyerTracker                    0x101165d48 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 4312898888
18 libdispatch.dylib                   0x1919d11c0 _dispatch_client_callout + 16
19 libdispatch.dylib                   0x1919de008 _dispatch_continuation_pop + 576
20 libdispatch.dylib                   0x1919ea648 _dispatch_source_latch_and_call + 204
21 libdispatch.dylib                   0x1919d3164 _dispatch_source_invoke + 820
22 libdispatch.dylib                   0x1919d5bc0 _dispatch_main_queue_callback_4CF + 572
23 CoreFoundation                      0x192af3f2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
24 CoreFoundation                      0x192af1b18 __CFRunLoopRun + 1660
25 CoreFoundation                      0x192a20048 CFRunLoopRunSpecific + 444
26 GraphicsServices                    0x1944a6198 GSEventRunModal + 180
27 UIKit                               0x198a0c2fc -[UIApplication _run] + 684
28 UIKit                               0x198a07034 UIApplicationMain + 208
29 [REDACTED]                          0x1002a4a64 main (AppDelegate.swift:5)
30 libdispatch.dylib                   0x191a045b8 (Missing)

#1. com.apple.CFNetwork.Connection
0  libsystem_kernel.dylib         0x191af816c mach_msg_trap + 8
1  libsystem_kernel.dylib         0x191af7fdc mach_msg + 72
2  libdispatch.dylib              0x1919e787c _dispatch_mach_send_and_wait_for_reply + 516
3  libdispatch.dylib              0x1919e7cc4 dispatch_mach_send_with_result_and_wait_for_reply + 60
4  libxpc.dylib                   0x191c1bfe0 xpc_connection_send_message_with_reply_sync + 196
5  Security                       0x192f59f58 securityd_message_with_reply_sync + 212
6  Security                       0x192f5a20c securityd_send_sync_and_do + 80
7  Security                       0x192f97540 __SecTrustEvaluateIfNecessary_block_invoke_2 + 404
8  Security                       0x192f74e4c SecOSStatusWith + 56
9  Security                       0x192f97388 __SecTrustEvaluateIfNecessary_block_invoke + 308
10 libsystem_trace.dylib          0x191bf5200 _os_activity_initiate + 76
11 Security                       0x192f95064 SecTrustEvaluateIfNecessary + 232
12 Security                       0x192f950ec SecTrustEvaluate + 64
13 CFNetwork                      0x1932c7b90 CFNetworkTrust::strictEvaluate(unsigned char, StrictSecurityPolicy::SessionStrengthPolicy, unsigned long) + 52
14 CFNetwork                      0x1932dc9d4 TCPIOConnection::_tlsProcessTrust_PolicyStrict() + 332
15 CFNetwork                      0x1932dc404 TCPIOConnection::_tlsProcessTrustPolicyResult(nw_tls_context*) + 136
16 libdispatch.dylib              0x1919d1200 _dispatch_call_block_and_release + 24
17 libdispatch.dylib              0x1919d11c0 _dispatch_client_callout + 16
18 libdispatch.dylib              0x1919df444 _dispatch_queue_serial_drain + 928
19 libdispatch.dylib              0x1919d49a8 _dispatch_queue_invoke + 652
20 libdispatch.dylib              0x1919e138c _dispatch_root_queue_drain + 572
21 libdispatch.dylib              0x1919e10ec _dispatch_worker_thread3 + 124
22 libsystem_pthread.dylib        0x191bda2b8 _pthread_wqthread + 1288
23 libsystem_pthread.dylib        0x191bd9da4 start_wqthread + 4

#2. Crashed: com.af.sdk
0  libobjc.A.dylib                0x1915980a0 objc_retain + 16
1  CoreFoundation                 0x192a274c4 -[__NSDictionaryM setObject:forKey:] + 200
2  AppsFlyerTracker               0x10115d8c8 -[AppsFlyerKeychainWrapper prepareForKeychain:] + 4312864968
3  AppsFlyerTracker               0x10115d6e0 -[AppsFlyerKeychainWrapper getObject:] + 4312864480
4  AppsFlyerTracker               0x1011659ac -[AppsFlyerTracker getKeychainData] + 4312897964
5  AppsFlyerTracker               0x10116572c -[AppsFlyerTracker setOriginalAppsFlyerIdToKeychainIfNeeded:] + 4312897324
6  AppsFlyerTracker               0x1011656dc -[AppsFlyerTracker getAppsFlyerUID] + 4312897244
7  AppsFlyerTracker               0x1011663d0 -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 4312900560
8  AppsFlyerTracker               0x101165d48 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 4312898888
9  libdispatch.dylib              0x1919d11c0 _dispatch_client_callout + 16
10 libdispatch.dylib              0x1919de008 _dispatch_continuation_pop + 576
11 libdispatch.dylib              0x1919ea648 _dispatch_source_latch_and_call + 204
12 libdispatch.dylib              0x1919d3164 _dispatch_source_invoke + 820
13 libdispatch.dylib              0x1919df278 _dispatch_queue_serial_drain + 468
14 libdispatch.dylib              0x1919d49a8 _dispatch_queue_invoke + 652
15 libdispatch.dylib              0x1919df940 _dispatch_queue_override_invoke + 360
16 libdispatch.dylib              0x1919e138c _dispatch_root_queue_drain + 572
17 libdispatch.dylib              0x1919e10ec _dispatch_worker_thread3 + 124
18 libsystem_pthread.dylib        0x191bda2b8 _pthread_wqthread + 1288
19 libsystem_pthread.dylib        0x191bd9da4 start_wqthread + 4

#3. Thread
0  libsystem_kernel.dylib         0x191b16a88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x191bda35c _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x191bd9da4 start_wqthread + 4

#4. com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x191af816c mach_msg_trap + 8
1  libsystem_kernel.dylib         0x191af7fdc mach_msg + 72
2  CoreFoundation                 0x192af3cec __CFRunLoopServiceMachPort + 192
3  CoreFoundation                 0x192af1908 __CFRunLoopRun + 1132
4  CoreFoundation                 0x192a20048 CFRunLoopRunSpecific + 444
5  Foundation                     0x193531a8c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6  Foundation                     0x19355257c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7  UIKit                          0x199381a2c -[UIEventFetcher threadMain] + 136
8  Foundation                     0x19362f47c __NSThread__start__ + 1024
9  libsystem_pthread.dylib        0x191bdc850 _pthread_body + 240
10 libsystem_pthread.dylib        0x191bdc760 _pthread_body + 282
11 libsystem_pthread.dylib        0x191bd9dac thread_start + 4

#5. Thread
0  libsystem_kernel.dylib         0x191b16a88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x191bda35c _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x191bd9da4 start_wqthread + 4

#6. Thread
0  libsystem_kernel.dylib         0x191b16a88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x191bda35c _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x191bd9da4 start_wqthread + 4

#7. RLMRealm notification listener
0  libsystem_kernel.dylib         0x191afc630 kevent + 8
1  Realm                          0x1026176d0 realm::_impl::ExternalCommitHelper::listen() (external_commit_helper.cpp:199)
2  Realm                          0x102618790 std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0>::operator()() (future:2341)
3  Realm                          0x102618718 std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::__execute() (future:1032)
4  Realm                          0x1026188e0 std::__1::__thread_proxy<std::__1::tuple<void (std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >*> >(void*, void*) (memory:2525)
5  libsystem_pthread.dylib        0x191bdc850 _pthread_body + 240
6  libsystem_pthread.dylib        0x191bdc760 _pthread_body + 282
7  libsystem_pthread.dylib        0x191bd9dac thread_start + 4

#8. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x191af816c mach_msg_trap + 8
1  libsystem_kernel.dylib         0x191af7fdc mach_msg + 72
2  CoreFoundation                 0x192af3cec __CFRunLoopServiceMachPort + 192
3  CoreFoundation                 0x192af1908 __CFRunLoopRun + 1132
4  CoreFoundation                 0x192a20048 CFRunLoopRunSpecific + 444
5  CFNetwork                      0x193211fd0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 336
6  Foundation                     0x19362f47c __NSThread__start__ + 1024
7  libsystem_pthread.dylib        0x191bdc850 _pthread_body + 240
8  libsystem_pthread.dylib        0x191bdc760 _pthread_body + 282
9  libsystem_pthread.dylib        0x191bd9dac thread_start + 4

#9. AFNetworking
0  libsystem_kernel.dylib         0x191af816c mach_msg_trap + 8
1  libsystem_kernel.dylib         0x191af7fdc mach_msg + 72
2  CoreFoundation                 0x192af3cec __CFRunLoopServiceMachPort + 192
3  CoreFoundation                 0x192af1908 __CFRunLoopRun + 1132
4  CoreFoundation                 0x192a20048 CFRunLoopRunSpecific + 444
5  Foundation                     0x193531a8c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6  Foundation                     0x193586210 -[NSRunLoop(NSRunLoop) run] + 88
7  [REDACTED]                     0x1009abbdc +[OptimizelyAFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:169)
8  Foundation                     0x19362f47c __NSThread__start__ + 1024
9  libsystem_pthread.dylib        0x191bdc850 _pthread_body + 240
10 libsystem_pthread.dylib        0x191bdc760 _pthread_body + 282
11 libsystem_pthread.dylib        0x191bd9dac thread_start + 4

#10. com.twitter.crashlytics.ios.MachExceptionServer
0  [REDACTED]                     0x100a6b7dc CLSProcessRecordAllThreads (CLSProcess.c:376)
1  [REDACTED]                     0x100a6b7dc CLSProcessRecordAllThreads (CLSProcess.c:376)
2  [REDACTED]                     0x100a6b698 CLSProcessRecordAllThreads (CLSProcess.c:407)
3  [REDACTED]                     0x100a5be44 CLSHandler (CLSHandler.m:26)
4  [REDACTED]                     0x100a56de8 CLSMachExceptionServer (CLSMachException.c:446)
5  libsystem_pthread.dylib        0x191bdc850 _pthread_body + 240
6  libsystem_pthread.dylib        0x191bdc760 _pthread_body + 282
7  libsystem_pthread.dylib        0x191bd9dac thread_start + 4

#11. Thread
0  libsystem_kernel.dylib         0x191b16a88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x191bda35c _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x191bd9da4 start_wqthread + 4

#12. Thread
0  libsystem_kernel.dylib         0x191b16a88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x191bda178 _pthread_wqthread + 968
2  libsystem_pthread.dylib        0x191bd9da4 start_wqthread + 4

#13. GAIThread
0  libsystem_kernel.dylib         0x191af816c mach_msg_trap + 8
1  libsystem_kernel.dylib         0x191af7fdc mach_msg + 72
2  CoreFoundation                 0x192af3cec __CFRunLoopServiceMachPort + 192
3  CoreFoundation                 0x192af1908 __CFRunLoopRun + 1132
4  CoreFoundation                 0x192a20048 CFRunLoopRunSpecific + 444
5  Foundation                     0x193531a8c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6  Foundation                     0x193586210 -[NSRunLoop(NSRunLoop) run] + 88
7  [REDACTED]                     0x10092836c +[GAI threadMain:] (GAI.m:241)
8  Foundation                     0x19362f47c __NSThread__start__ + 1024
9  libsystem_pthread.dylib        0x191bdc850 _pthread_body + 240
10 libsystem_pthread.dylib        0x191bdc760 _pthread_body + 282
11 libsystem_pthread.dylib        0x191bd9dac thread_start + 4


-[AppsFlyerTracker sendLaunchToServer] Crash with -[NSDate timeIntervalSinceDate:]

I have 9 crash from last 90 days in production from AppsFlyerFramework (4.7.3).
Below I write all the information that I have:

Stack trace from Fabric (I replace my app name to XXX):

Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x23041b0b __exceptionPreprocess
1 libobjc.A.dylib 0x227fedff objc_exception_throw
2 CoreFoundation 0x23047455 __methodDescriptionForSelector
3 CoreFoundation 0x230450ab forwarding
4 CoreFoundation 0x22f6f298 _CF_forwarding_prep_0
5 CoreFoundation 0x22f68d35 -[NSDate timeIntervalSinceDate:]
6 XXX 0xb1b983 -[AppsFlyerTracker sendLaunchToServer]
7 libdispatch.dylib 0x22bd3cbf _dispatch_call_block_and_release
8 libdispatch.dylib 0x22bdd3cf _dispatch_after_timer_callback
9 libdispatch.dylib 0x22be65bb _dispatch_source_latch_and_call
10 libdispatch.dylib 0x22bd5bff _dispatch_source_invoke
11 libdispatch.dylib 0x22bdd9ed _dispatch_queue_drain
12 libdispatch.dylib 0x22bd6e17 _dispatch_queue_invoke
13 libdispatch.dylib 0x22bdf20d _dispatch_root_queue_drain
14 libdispatch.dylib 0x22bdf07b _dispatch_worker_thread3
15 libsystem_pthread.dylib 0x22d72e0d _pthread_wqthread
16 libsystem_pthread.dylib 0x22d729fc start_wqthread

I add symbolic breackpoint to -[AppsFlyerTracker sendLaunchToServer] and I see next stack:

-[AppsFlyerTracker sendLaunchToServer]:
-> 0x10c5b51b9 <+0>: pushq %rbp
0x10c5b51ba <+1>: movq %rsp, %rbp
0x10c5b51bd <+4>: pushq %r15
0x10c5b51bf <+6>: pushq %r14
0x10c5b51c1 <+8>: pushq %r12
0x10c5b51c3 <+10>: pushq %rbx
0x10c5b51c4 <+11>: subq $0x10, %rsp
0x10c5b51c8 <+15>: movq %rdi, %r14
0x10c5b51cb <+18>: movq 0x585b36(%rip), %r12 ; AppsFlyerTracker.timeWentToBG
0x10c5b51d2 <+25>: cmpq $0x0, (%r14,%r12)
0x10c5b51d7 <+30>: je 0x10c5b522a ; <+113>
0x10c5b51d9 <+32>: movq 0x578380(%rip), %rdi ; (void *)0x0000000114a4b0d0: NSDate
0x10c5b51e0 <+39>: movq 0x55ea09(%rip), %rsi ; "date"
0x10c5b51e7 <+46>: movq 0x2e9c32(%rip), %r15 ; (void *)0x000000010e009ac0: objc_msgSend
0x10c5b51ee <+53>: callq *%r15
0x10c5b51f1 <+56>: movq %rax, %rdi
0x10c5b51f4 <+59>: callq 0x10c68ed98 ; symbol stub for: objc_retainAutoreleasedReturnValue
0x10c5b51f9 <+64>: movq %rax, %rbx
0x10c5b51fc <+67>: movq (%r14,%r12), %rdx
0x10c5b5200 <+71>: movq 0x562c29(%rip), %rsi ; "timeIntervalSinceDate:"
0x10c5b5207 <+78>: movq %rbx, %rdi
0x10c5b520a <+81>: callq *%r15
0x10c5b520d <+84>: movsd %xmm0, -0x28(%rbp)
0x10c5b5212 <+89>: movq %rbx, %rdi
0x10c5b5215 <+92>: callq *0x2e9c2d(%rip) ; (void *)0x000000010e006d50: objc_release
0x10c5b521b <+98>: movsd -0x28(%rbp), %xmm0 ; xmm0 = mem[0],zero
0x10c5b5220 <+103>: ucomisd 0x2569c8(%rip), %xmm0 ; kWiFiNetworkAnimationDefaultDuration + 110
0x10c5b5228 <+111>: jbe 0x10c5b524d ; <+148>
0x10c5b522a <+113>: movq 0x573bcf(%rip), %rsi ; "callServerWithEventName:"
0x10c5b5231 <+120>: leaq 0x382a68(%rip), %rdx ; @"Launched"
0x10c5b5238 <+127>: movq %r14, %rdi
0x10c5b523b <+130>: addq $0x10, %rsp
0x10c5b523f <+134>: popq %rbx
0x10c5b5240 <+135>: popq %r12
0x10c5b5242 <+137>: popq %r14
0x10c5b5244 <+139>: popq %r15
0x10c5b5246 <+141>: popq %rbp
0x10c5b5247 <+142>: jmpq *0x2e9bd3(%rip) ; (void *)0x000000010e009ac0: objc_msgSend
0x10c5b524d <+148>: movq 0x573964(%rip), %rsi ; "isDebug"
0x10c5b5254 <+155>: movq %r14, %rdi
0x10c5b5257 <+158>: callq *0x2e9bc3(%rip) ; (void *)0x000000010e009ac0: objc_msgSend
0x10c5b525d <+164>: testb %al, %al
0x10c5b525f <+166>: je 0x10c5b527b ; <+194>
0x10c5b5261 <+168>: leaq 0x382bd8(%rip), %rdi ; @"AppsFlyer: %s Time from launch %f"
0x10c5b5268 <+175>: leaq 0x202ac9(%rip), %rsi ; "-[AppsFlyerTracker sendLaunchToServer]"
0x10c5b526f <+182>: movb $0x1, %al
0x10c5b5271 <+184>: movsd -0x28(%rbp), %xmm0 ; xmm0 = mem[0],zero
0x10c5b5276 <+189>: callq 0x10c68d976 ; symbol stub for: NSLog
0x10c5b527b <+194>: movq 0x57af26(%rip), %rdi ; (void *)0x000000010cb696c0: AppsFlyerRemoteDebugManager
0x10c5b5282 <+201>: movq 0x5606ef(%rip), %rsi ; "sharedManager"
0x10c5b5289 <+208>: callq *%r15
0x10c5b528c <+211>: movq %rax, %rdi
0x10c5b528f <+214>: callq 0x10c68ed98 ; symbol stub for: objc_retainAutoreleasedReturnValue
0x10c5b5294 <+219>: movq %rax, %rbx
0x10c5b5297 <+222>: movq 0x57383a(%rip), %rsi ; "isRemoteDebugging"
0x10c5b529e <+229>: movq %rbx, %rdi
0x10c5b52a1 <+232>: callq *%r15
0x10c5b52a4 <+235>: movb %al, %r14b
0x10c5b52a7 <+238>: movq %rbx, %rdi
0x10c5b52aa <+241>: callq *0x2e9b98(%rip) ; (void *)0x000000010e006d50: objc_release
0x10c5b52b0 <+247>: testb %r14b, %r14b
0x10c5b52b3 <+250>: je 0x10c5b52db ; <+290>
0x10c5b52b5 <+252>: leaq 0x202a7c(%rip), %rdi ; "-[AppsFlyerTracker sendLaunchToServer]"
0x10c5b52bc <+259>: leaq 0x382b9d(%rip), %rsi ; @"Time from launch %f"
0x10c5b52c3 <+266>: movb $0x1, %al
0x10c5b52c5 <+268>: movsd -0x28(%rbp), %xmm0 ; xmm0 = mem[0],zero
0x10c5b52ca <+273>: addq $0x10, %rsp
0x10c5b52ce <+277>: popq %rbx
0x10c5b52cf <+278>: popq %r12
0x10c5b52d1 <+280>: popq %r14
0x10c5b52d3 <+282>: popq %r15
0x10c5b52d5 <+284>: popq %rbp
0x10c5b52d6 <+285>: jmp 0x10c5aba67 ; addLogEvent
0x10c5b52db <+290>: addq $0x10, %rsp
0x10c5b52df <+294>: popq %rbx
0x10c5b52e0 <+295>: popq %r12
0x10c5b52e2 <+297>: popq %r14
0x10c5b52e4 <+299>: popq %r15
0x10c5b52e6 <+301>: popq %rbp
0x10c5b52e7 <+302>: retq

In every crash log I see message like this:

-[ANSLifecycleEvent timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x1576ccb0
-[__NSCFString timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x8d75890
-[NSMutableURLRequest timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x15f471d0

It seems like send message to deallocated object (maybe it is AppsFlyerTracker.timeWentToBG? But I can't find what is AppsFlyerTracker.timeWentToBG`).

Reachability error

Hello. I am installing your library and AppleReachability with pods

pod 'AppsFlyerFramework', '~> 4.6.1'
pod 'AppleReachability'

and have an error when compiling the project

duplicate symbol _OBJC_CLASS_$_Reachability in:
    .../AppleReachability/libAppleReachability.a(Reachability.o)
    .../AppsFlyerFramework/AppsFlyerLib.framework/AppsFlyerLib(Reachability.o)

How can I solve this problem?

Crash on `[AppsFlyerKeychainWrapper prepareForKeychain:]`

We are seeing this crash on crashlytics about 350 crashes in the last week.
OS Version: 10.2.1 (14D27)
AppsFlyer iOS SDK: v4.5.12

#10. Crashed: com.af.sdk
0  libobjc.A.dylib                0x190ed40a0 objc_retain + 16
1  CoreFoundation                 0x192365734 -[__NSDictionaryM setObject:forKey:] + 200
2  SafetyMap                      0x100ab02cc -[AppsFlyerKeychainWrapper prepareForKeychain:] + 4305879756
3  SafetyMap                      0x100ab00e4 -[AppsFlyerKeychainWrapper getObject:] + 4305879268
4  SafetyMap                      0x100ab8384 -[AppsFlyerTracker getKeychainData] + 4305912708
5  SafetyMap                      0x100ab8104 -[AppsFlyerTracker setOriginalAppsFlyerIdToKeychainIfNeeded:] + 4305912068
6  SafetyMap                      0x100abc114 -[AppsFlyerTracker getVersionUpdateDate:currentUpdateDate:] + 4305928468
7  SafetyMap                      0x100aba20c -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 4305920524
8  SafetyMap                      0x100ab8720 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 4305913632
9  libdispatch.dylib              0x19130e1bc _dispatch_client_callout + 16
10 libdispatch.dylib              0x19131af94 _dispatch_continuation_pop + 576
11 libdispatch.dylib              0x191327634 _dispatch_source_latch_and_call + 204
12 libdispatch.dylib              0x191310160 _dispatch_source_invoke + 820
13 libdispatch.dylib              0x19131c210 _dispatch_queue_serial_drain + 468
14 libdispatch.dylib              0x1913119a4 _dispatch_queue_invoke + 652
15 libdispatch.dylib              0x19131c8d8 _dispatch_queue_override_invoke + 360
16 libdispatch.dylib              0x19131e34c _dispatch_root_queue_drain + 572
17 libdispatch.dylib              0x19131e0ac _dispatch_worker_thread3 + 124
18 libsystem_pthread.dylib        0x1915172a0 _pthread_wqthread + 1288
19 libsystem_pthread.dylib        0x191516d8c start_wqthread + 4

--

#0. com.apple.main-thread
0  libsystem_kernel.dylib         0x191435188 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x191434ff8 mach_msg + 72
2  libdispatch.dylib              0x191324868 _dispatch_mach_send_and_wait_for_reply + 516
3  libdispatch.dylib              0x191324cb0 dispatch_mach_send_with_result_and_wait_for_reply + 60
4  libxpc.dylib                   0x191558f90 xpc_connection_send_message_with_reply_sync + 196
5  Security                       0x192899874 securityd_message_with_reply_sync + 212
6  Security                       0x192899b28 securityd_send_sync_and_do + 80
7  Security                       0x1928b6838 __SecItemCopyMatching_block_invoke_2 + 212
8  Security                       0x1928b836c __SecItemAuthDoQuery_block_invoke + 304
9  Security                       0x1928b509c SecItemAuthDo + 448
10 Security                       0x1928b5fc8 SecItemAuthDoQuery + 492
11 Security                       0x1928b6758 __SecItemCopyMatching_block_invoke + 112
12 Security                       0x1928b4808 SecOSStatusWith + 56
13 Security                       0x1928b66a0 SecItemCopyMatching + 404
14 SafetyMap                      0x100ab014c -[AppsFlyerKeychainWrapper getObject:] + 4305879372
15 SafetyMap                      0x100ab8424 -[AppsFlyerTracker getKeychainData] + 4305912868
16 SafetyMap                      0x100ab8104 -[AppsFlyerTracker setOriginalAppsFlyerIdToKeychainIfNeeded:] + 4305912068
17 SafetyMap                      0x100abc114 -[AppsFlyerTracker getVersionUpdateDate:currentUpdateDate:] + 4305928468
18 SafetyMap                      0x100aba20c -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 4305920524
19 SafetyMap                      0x100ab8720 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 4305913632
20 libdispatch.dylib              0x19130e1bc _dispatch_client_callout + 16
21 libdispatch.dylib              0x19131af94 _dispatch_continuation_pop + 576
22 libdispatch.dylib              0x191327634 _dispatch_source_latch_and_call + 204
23 libdispatch.dylib              0x191310160 _dispatch_source_invoke + 820
24 libdispatch.dylib              0x191312bbc _dispatch_main_queue_callback_4CF + 572
25 CoreFoundation                 0x192432810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
26 CoreFoundation                 0x1924303fc __CFRunLoopRun + 1660
27 CoreFoundation                 0x19235e2b8 CFRunLoopRunSpecific + 444
28 GraphicsServices               0x193e12198 GSEventRunModal + 180
29 UIKit                          0x1983a57fc -[UIApplication _run] + 684
30 UIKit                          0x1983a0534 UIApplicationMain + 208
31 SafetyMap                      0x1000f295c main (main.m:15)
32 libdispatch.dylib              0x1913415b8 (Missing)

#10. Crashed: com.af.sdk
0  libobjc.A.dylib                0x190ed40a0 objc_retain + 16
1  CoreFoundation                 0x192365734 -[__NSDictionaryM setObject:forKey:] + 200
2  SafetyMap                      0x100ab02cc -[AppsFlyerKeychainWrapper prepareForKeychain:] + 4305879756
3  SafetyMap                      0x100ab00e4 -[AppsFlyerKeychainWrapper getObject:] + 4305879268
4  SafetyMap                      0x100ab8384 -[AppsFlyerTracker getKeychainData] + 4305912708
5  SafetyMap                      0x100ab8104 -[AppsFlyerTracker setOriginalAppsFlyerIdToKeychainIfNeeded:] + 4305912068
6  SafetyMap                      0x100abc114 -[AppsFlyerTracker getVersionUpdateDate:currentUpdateDate:] + 4305928468
7  SafetyMap                      0x100aba20c -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 4305920524
8  SafetyMap                      0x100ab8720 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 4305913632
9  libdispatch.dylib              0x19130e1bc _dispatch_client_callout + 16
10 libdispatch.dylib              0x19131af94 _dispatch_continuation_pop + 576
11 libdispatch.dylib              0x191327634 _dispatch_source_latch_and_call + 204
12 libdispatch.dylib              0x191310160 _dispatch_source_invoke + 820
13 libdispatch.dylib              0x19131c210 _dispatch_queue_serial_drain + 468
14 libdispatch.dylib              0x1913119a4 _dispatch_queue_invoke + 652
15 libdispatch.dylib              0x19131c8d8 _dispatch_queue_override_invoke + 360
16 libdispatch.dylib              0x19131e34c _dispatch_root_queue_drain + 572
17 libdispatch.dylib              0x19131e0ac _dispatch_worker_thread3 + 124
18 libsystem_pthread.dylib        0x1915172a0 _pthread_wqthread + 1288
19 libsystem_pthread.dylib        0x191516d8c start_wqthread + 4

Duplicate symbols on linking when targeting the simulator

I'm having a heck of a time getting my project to build against the simulator -- I'm getting the following errors:

duplicate symbol _llvm.cmdline in:
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerTracker.o)
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerUtils.o)
duplicate symbol _llvm.embedded.module in:
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerTracker.o)
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerUtils.o)
duplicate symbol _llvm.cmdline in:
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerTracker.o)
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerServerHandler.o)
duplicate symbol _llvm.embedded.module in:
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerTracker.o)
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerServerHandler.o)
duplicate symbol _llvm.cmdline in:
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerTracker.o)
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerRequestCache.o)
duplicate symbol _llvm.embedded.module in:
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerTracker.o)
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerRequestCache.o)
duplicate symbol _llvm.cmdline in:
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerTracker.o)
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerRequestCacheData.o)
duplicate symbol _llvm.embedded.module in:
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerTracker.o)
    /Users/ben/obfuscated/AppsFlyer.framework/AppsFlyer(AppsFlyerRequestCacheData.o)
ld: 8 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I copied the framework to my project, and I see these errors both when using Link Binary with Libraries and when adding -framework AppsFlyer to my Other Linker Flags

Any guidance would be much appreciated.

Import string for swift

In version 4.5.12 i had some problems because used old import string in my swift code:
import AppsFlyerTracker
Please add to description that with this version import string need to be changed to
import AppsFlyerLib

Warnings are raised if you are using iOS 8

Why is - (void) handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication __attribute__((deprecated)); deprecated?

If you are supporting iOS 8+ you HAVE to use this method which means you will always have a warning when you compile your app. If AppsFlyer officially supports iOS 8 then this method should not be deprecated. Or at the very least use the attribute flag to indicate that it is deprecated in iOS 9 and above http://nshipster.com/__attribute__/

Crash on App Launch

When i call the following method.
AppsFlyerTracker.sharedTracker().trackAppLaunch()
The app crashes below is the crash report

 # Crashlytics - plaintext stacktrace downloaded by Vinayak at Wed, 17 Aug 2016 12:14:58 GMT
# URL: https://fabric.io/signeasy/ios/apps/com.glykka.easysign/issues/57b40f1cffcdc04250ca80f3/sessions/a6c46026998844b1a5724a6af61da1da
# Organization: SignEasy
# Platform: iOS
# Application: SignEasy
# Version: 7.0.0.1
# Bundle Identifier: com.glykka.easysign
# Issue #: 8104
# Issue ID: 57b40f1cffcdc04250ca80f3
# Session ID: a6c46026998844b1a5724a6af61da1da
# Date: 2016-08-17T07:07:11Z
# OS Version: 9.3.2 (13F69)
# Device: iPhone 6 Plus
# RAM Free: 6.4%
# Disk Free: 49.1%

#3. Crashed: NSOperationQueue 0x12ffe68d0 :: NSOperation 0x13121a460 (QOS: LEGACY)
0  libobjc.A.dylib                0x181edc0b0 objc_retain + 16
1  SignEasyAnalytics              0x102209c34 __82-[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:]_block_invoke863 + 60
2  SignEasyAnalytics              0x10220b580 __94+[AppsFlyerServerHandler sendRequestEventToServer:isRequestFromCache:appID:isDebug:onSuccess:]_block_invoke + 664
3  CFNetwork                      0x182e4b5a0 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
4  CFNetwork                      0x182e5e120 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 296
5  Foundation                     0x183218540 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
6  Foundation                     0x18316a870 -[NSBlockOperation main] + 96
7  Foundation                     0x18315ae48 -[__NSOperationInternal _start:] + 604
8  Foundation                     0x18321a934 __NSOQSchedule_f + 224
9  libdispatch.dylib              0x1822a947c _dispatch_client_callout + 16
10 libdispatch.dylib              0x1822b54c0 _dispatch_queue_drain + 864
11 libdispatch.dylib              0x1822acf80 _dispatch_queue_invoke + 464
12 libdispatch.dylib              0x1822b7390 _dispatch_root_queue_drain + 728
13 libdispatch.dylib              0x1822b70b0 _dispatch_worker_thread3 + 112
14 libsystem_pthread.dylib        0x1824c1470 _pthread_wqthread + 1092
15 libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

--

#0. com.apple.main-thread
0  libsystem_kernel.dylib         0x1823dcfd8 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1823dce54 mach_msg + 72
2  CoreFoundation                 0x182814c60 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x182812964 __CFRunLoopRun + 1032
4  CoreFoundation                 0x18273cc50 CFRunLoopRunSpecific + 384
5  GraphicsServices               0x184024088 GSEventRunModal + 180
6  UIKit                          0x187a26088 UIApplicationMain + 204
7  SignEasy                       0x1000426fc main (AppDelegate.swift:24)
8  libdispatch.dylib              0x1822da8b8 (Missing)

#1. Thread
0  libsystem_kernel.dylib         0x1823f8b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1824c1530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

#2. com.apple.libdispatch-manager
0  libsystem_kernel.dylib         0x1823f94d8 kevent_qos + 8
1  libdispatch.dylib              0x1822bc7d8 _dispatch_mgr_invoke + 232
2  libdispatch.dylib              0x1822ab648 _dispatch_source_invoke + 50

#3. Crashed: NSOperationQueue 0x12ffe68d0 :: NSOperation 0x13121a460 (QOS: LEGACY)
0  libobjc.A.dylib                0x181edc0b0 objc_retain + 16
1  SignEasyAnalytics              0x102209c34 __82-[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:]_block_invoke863 + 60
2  SignEasyAnalytics              0x10220b580 __94+[AppsFlyerServerHandler sendRequestEventToServer:isRequestFromCache:appID:isDebug:onSuccess:]_block_invoke + 664
3  CFNetwork                      0x182e4b5a0 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
4  CFNetwork                      0x182e5e120 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 296
5  Foundation                     0x183218540 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
6  Foundation                     0x18316a870 -[NSBlockOperation main] + 96
7  Foundation                     0x18315ae48 -[__NSOperationInternal _start:] + 604
8  Foundation                     0x18321a934 __NSOQSchedule_f + 224
9  libdispatch.dylib              0x1822a947c _dispatch_client_callout + 16
10 libdispatch.dylib              0x1822b54c0 _dispatch_queue_drain + 864
11 libdispatch.dylib              0x1822acf80 _dispatch_queue_invoke + 464
12 libdispatch.dylib              0x1822b7390 _dispatch_root_queue_drain + 728
13 libdispatch.dylib              0x1822b70b0 _dispatch_worker_thread3 + 112
14 libsystem_pthread.dylib        0x1824c1470 _pthread_wqthread + 1092
15 libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

#4. Thread
0  libsystem_kernel.dylib         0x1823f8b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1824c1530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

#5. Thread
0  libsystem_kernel.dylib         0x1823f8b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1824c1530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

#6. Thread
0  libsystem_kernel.dylib         0x1823f8b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1824c1530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

#7. Thread
0  libsystem_kernel.dylib         0x1823f8b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1824c1530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

#8. Thread
0  libsystem_kernel.dylib         0x1823f8b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1824c1530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

#9. com.google.gmp.measurement.worker
0  libsystem_kernel.dylib         0x1823df354 fsync + 8
1  libsqlite3.dylib               0x182d830e4 (null) + 49640
2  libsqlite3.dylib               0x182d82f78 (null) + 49276
3  libsqlite3.dylib               0x182d72b24 (null) + 17116
4  libsqlite3.dylib               0x182d45aac (null) + 2524
5  libsqlite3.dylib               0x182d6d3cc (null) + 56548
6  libsqlite3.dylib               0x182d5f8e0 sqlite3_step + 504
7  libsqlite3.dylib               0x182d2e5d4 sqlite3_exec + 496
8  SignEasy                       0x1000d7d50 -[FIRASqliteStore endTransaction] + 72
9  SignEasy                       0x1000d7be0 -[FIRASqliteStore performTransaction:] + 536
10 SignEasy                       0x1000ef1e4 -[FIRAMeasurement logEventOnWorkerQueue:] + 680
11 SignEasy                       0x1000fcae8 __52-[FIRAScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 44
12 libdispatch.dylib              0x1822a94bc _dispatch_call_block_and_release + 24
13 libdispatch.dylib              0x1822a947c _dispatch_client_callout + 16
14 libdispatch.dylib              0x1822b54c0 _dispatch_queue_drain + 864
15 libdispatch.dylib              0x1822acf80 _dispatch_queue_invoke + 464
16 libdispatch.dylib              0x1822b7390 _dispatch_root_queue_drain + 728
17 libdispatch.dylib              0x1822b70b0 _dispatch_worker_thread3 + 112
18 libsystem_pthread.dylib        0x1824c1470 _pthread_wqthread + 1092
19 libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

#10. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1823dcfd8 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1823dce54 mach_msg + 72
2  CoreFoundation                 0x182814c60 __CFRunLoopServiceMachPort + 196
3  CoreFoundation                 0x182812964 __CFRunLoopRun + 1032
4  CoreFoundation                 0x18273cc50 CFRunLoopRunSpecific + 384
5  CFNetwork                      0x182ebdc68 +[NSURLConnection(Loader) _resourceLoadLoop:] + 412
6  Foundation                     0x183233e4c __NSThread__start__ + 1000
7  libsystem_pthread.dylib        0x1824c3b28 _pthread_body + 156
8  libsystem_pthread.dylib        0x1824c3a8c _pthread_body + 154
9  libsystem_pthread.dylib        0x1824c1028 thread_start + 4

#11. com.apple.CFSocket.private
0  libsystem_kernel.dylib         0x1823f8344 __select + 8
1  CoreFoundation                 0x18281b1c8 __CFSocketManager + 648
2  libsystem_pthread.dylib        0x1824c3b28 _pthread_body + 156
3  libsystem_pthread.dylib        0x1824c3a8c _pthread_body + 154
4  libsystem_pthread.dylib        0x1824c1028 thread_start + 4

#12. com.twitter.crashlytics.ios.MachExceptionServer
0  SignEasy                       0x1000a795c CLSProcessRecordAllThreads + 1572
1  SignEasy                       0x1000a795c CLSProcessRecordAllThreads + 1572
2  SignEasy                       0x1000a7818 CLSProcessRecordAllThreads + 1248
3  SignEasy                       0x100097fc8 CLSHandler + 48
4  SignEasy                       0x100092f6c CLSMachExceptionServer + 424
5  libsystem_pthread.dylib        0x1824c3b28 _pthread_body + 156
6  libsystem_pthread.dylib        0x1824c3a8c _pthread_body + 154
7  libsystem_pthread.dylib        0x1824c1028 thread_start + 4

#13. Thread
0  libsystem_kernel.dylib         0x1823f8b48 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1824c1530 _pthread_wqthread + 1284
2  libsystem_pthread.dylib        0x1824c1020 start_wqthread + 4

Background urlsession crashes app in background

<BKProcessAssertion: 0x156527290> id: 6297-C307F39D-D800-4104-ACD5-665BD55C09B8 name: com.apple.nsurlsessiond.handlesession com.appsflyer.sdk process: <BKNewProcess: 0x1566464f0; com.outapp.identifier; pid: 6587; hostpid: -1> permittedBackgroundDuration: 30.000000 reason: backgroundDownload owner pid:6297 preventSuspend preventThrottleDownUI preventIdleSleep preventSuspendOnSleep

Steps to reproduce: (Version 4.3.8, Framework)

  1. Background the app
  2. Send multiple push notifications

Watch the device logs and see that a background task is not invalidated in time which cause iOS to terminate the app in the background

Derived data warning on 3.3.1

Hi AppFlyer team,

I was just updating my app with Appflyer 3.3.1. Everything went fine & clean with version 3.3.0, but after update to 3.3.1 using cocoapods i got these following warnings :

no such file/derived data warning :
warning: /Users/golan/Library/Developer/Xcode/DerivedData/AppsFlyerLib-ahecwkkcwzvaoqdfeixypezvtbys/Build/Intermediates/PrecompiledHeaders/AppsFlyerLib-Prefix-hjiknwycdpkteehfgiqxklkyhuiw/AppsFlyerLib-Prefix.pch.pch: No such file or directory

and about several "could not resolve external type" warnings :
warning: Could not resolve external type c:objc(cs)NSObject
warning: Could not resolve external type c:objc(cs)NSMutableArray
warning: Could not resolve external type c:objc(cs)NSNumber
-- about 30 warning like this --

I've tried to clean & rebuild the project on xcode 7, also re-install from cocoapods but the warning keeps showing. FYI, our app support for minimum OS 7.
Could you guys help me regarding this issue ? Is there any additional XCode settings/configurations that I am not aware of to solve this ?

Thank you.

Issue with iOS 10.3 and WKWebview

We believe that Appsflyer is causing issues with XHR POST requests in WKWebview in iOS 10.3.
Specifically, the POST request is sent with empty data, thus causing issues on any site using POST requests.

Commenting out AppsFlyerTracker.shared().trackAppLaunch() fixes this, which leads us to believe that the SDK is somehow interfering with requests made from WKWebview.

Also, we're getting the following errors in XCode:

2017-01-27 15:09:39.374330+0100 AppsFlyerTest[1428:16479088] [] nw_socket_get_input_frames recvmsg(fd 29, 1024 bytes): [54] Connection reset by peer
2017-01-27 15:09:39.376060+0100 AppsFlyerTest[1428:16479088] [] nw_socket_write_close shutdown(29, SHUT_WR): [57] Socket is not connected
2017-01-27 15:09:39.376465+0100 AppsFlyerTest[1428:16479088] [] nw_endpoint_flow_service_writes [11.1 193.0.160.206:443 ready socket-flow (satisfied)] Write request has 0 frame count, 0 byte count
2017-01-27 15:09:39.377191+0100 AppsFlyerTest[1428:16478106] [] tcp_connection_write_eof_block_invoke Write close callback received error: [89] Operation canceled
2017-01-27 15:09:39.794577+0100 AppsFlyerTest[1428:16479088] [] nw_endpoint_handler_add_write_request [35.1 193.0.160.206:443 failed socket-flow (satisfied)] cannot accept write requests
2017-01-27 15:09:39.795229+0100 AppsFlyerTest[1428:16478305] [] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument
2017-01-27 15:09:39.890337+0100 AppsFlyerTest[1428:16479088] [] nw_endpoint_handler_add_write_request [23.1 193.0.160.184:443 failed socket-flow (satisfied)] cannot accept write requests
2017-01-27 15:09:39.890826+0100 AppsFlyerTest[1428:16478305] [] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument
2017-01-27 15:09:40.525247+0100 AppsFlyerTest[1428:16479088] [] nw_socket_get_input_frames recvmsg(fd 63, 1024 bytes): [54] Connection reset by peer
2017-01-27 15:09:40.526758+0100 AppsFlyerTest[1428:16479088] [] nw_socket_get_input_frames recvmsg(fd 66, 1024 bytes): [54] Connection reset by peer
2017-01-27 15:09:40.529243+0100 AppsFlyerTest[1428:16479088] [] nw_socket_write_close shutdown(63, SHUT_WR): [57] Socket is not connected
2017-01-27 15:09:40.529705+0100 AppsFlyerTest[1428:16479088] [] nw_endpoint_flow_service_writes [48.1 193.0.160.206:443 ready socket-flow (satisfied)] Write request has 0 frame count, 0 byte count
2017-01-27 15:09:40.530478+0100 AppsFlyerTest[1428:16478305] [] tcp_connection_write_eof_block_invoke Write close callback received error: [89] Operation canceled
2017-01-27 15:09:40.531351+0100 AppsFlyerTest[1428:16479088] [] nw_socket_write_close shutdown(66, SHUT_WR): [57] Socket is not connected
2017-01-27 15:09:40.531582+0100 AppsFlyerTest[1428:16479088] [] nw_endpoint_flow_service_writes [52.1 193.0.160.206:443 ready socket-flow (satisfied)] Write request has 0 frame count, 0 byte count
2017-01-27 15:09:40.532131+0100 AppsFlyerTest[1428:16478305] [] tcp_connection_write_eof_block_invoke Write close callback received error: [89] Operation canceled
2017-01-27 15:09:40.534796+0100 AppsFlyerTest[1428:16479088] [] nw_endpoint_handler_add_write_request [49.1 193.0.160.206:443 failed socket-flow (satisfied)] cannot accept write requests
2017-01-27 15:09:40.535025+0100 AppsFlyerTest[1428:16478305] [] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument
2017-01-27 15:09:40.536991+0100 AppsFlyerTest[1428:16479088] [] nw_endpoint_handler_add_write_request [47.1 193.0.160.185:443 failed socket-flow (satisfied)] cannot accept write requests
2017-01-27 15:09:40.537426+0100 AppsFlyerTest[1428:16478305] [] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument
2017-01-27 15:09:40.836821+0100 AppsFlyerTest[1428:16478305] [] nw_socket_get_input_frames recvmsg(fd 12, 1024 bytes): [54] Connection reset by peer
2017-01-27 15:09:40.837547+0100 AppsFlyerTest[1428:16478305] [] nw_socket_write_close shutdown(12, SHUT_WR): [57] Socket is not connected
2017-01-27 15:09:40.837826+0100 AppsFlyerTest[1428:16478305] [] nw_endpoint_flow_service_writes [58.1 193.0.160.182:443 ready socket-flow (satisfied)] Write request has 0 frame count, 0 byte count
2017-01-27 15:09:40.838550+0100 AppsFlyerTest[1428:16479088] [] tcp_connection_write_eof_block_invoke Write close callback received error: [89] Operation canceled
2017-01-27 15:09:41.746787+0100 AppsFlyerTest[1428:16478106] [] nw_endpoint_handler_add_write_request [62.1 193.0.160.206:443 failed socket-flow (satisfied)] cannot accept write requests
2017-01-27 15:09:41.747561+0100 AppsFlyerTest[1428:16478305] [] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument
2017-01-27 15:09:58.804141+0100 AppsFlyerTest[1428:16479086] [] nw_endpoint_handler_add_write_request [31.1 185.94.180.125:443 failed socket-flow (satisfied)] cannot accept write requests
2017-01-27 15:09:58.804845+0100 AppsFlyerTest[1428:16479088] [] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument

pod spec use_frameworks dependency

AppsFlyerFramework failes integrate with cocoapods if defined as a dependency of another spec.
Using:
AppsFlyerFramework 4.6.1.
cocoapods 1.2.1.beta.1 (other versions also)

[!] The 'Pods-SampleProject_Example' target has transitive dependencies that include static binaries: (/Example/Pods/AppsFlyerFramework/AppsFlyerLib.framework)

handleOpenUrl:sourceApplication:withAnnotation crashes since conversion to swift 3

Integrated via cocoapods 1.0.1:

pod 'AppsFlyerFramework', '4.5.3'

The following line in our app crashes:

appsFlyerTracker.handleOpen(url, sourceApplication: sourceApplication, withAnnotation: annotation)

Since the conversion of our project to swift 3, the annotation parameter is exposed as Any and we get the following crash when opening a very basic url such as appscheme://: http://crashes.to/s/117e166d3ee

-[AppsFlyerTracker handleOpenURL:sourceApplication:withAnnotation:]

Fatal Exception: NSInvalidArgumentException
-[_SwiftValue objectForKey:]: unrecognized selector sent to instance 0x156119320

Passing nil to the annotation parameter fixes the issue.

It's worth noting that handleOpenURL:sourceApplication:withAnnotation: is deprecated since iOS 9 in favor of https://developer.apple.com/reference/uikit/uiapplicationdelegate/1623112-application

AppsFlyer-SDK 4.3.6 crash on iOS 7

Crash on iOS 7 when call [AppsFlyerTracker sharedTracker]

+[NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:]: unrecognized selector sent to class 0x39f2c05c

Method backgroundSessionConfigurationWithIdentifier: of NSURLSessionConfiguration class only available from iOS 8 and above

Crash in [AppsFlyerKeychainWrapper prepareForKeychain:]

Thread : Crashed: com.apple.main-thread
0  CoreFoundation                 0x181bf2ba8 CFRetain + 40
1  CoreFoundation                 0x181c00bec -[__NSDictionaryM setObject:forKey:] + 200
2  CuvvaHourly                    0x1003c757c -[AppsFlyerKeychainWrapper prepareForKeychain:] + 336
3  CuvvaHourly                    0x1003c7394 -[AppsFlyerKeychainWrapper getObject:] + 28
4  CuvvaHourly                    0x1003c0dc4 -[AppsFlyerTracker getKeychainData] + 136
5  CuvvaHourly                    0x1003c0cd0 -[AppsFlyerTracker getAppsFlyerUID] + 280
6  CuvvaHourly                    0x1003c16fc -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:] + 812
7  CuvvaHourly                    0x1003c1150 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:] + 72
8  libdispatch.dylib              0x181769630 _dispatch_call_block_and_release + 24
9  libdispatch.dylib              0x1817695f0 _dispatch_client_callout + 16
10 libdispatch.dylib              0x181774e7c _dispatch_after_timer_callback + 92
11 libdispatch.dylib              0x1817695f0 _dispatch_client_callout + 16
12 libdispatch.dylib              0x181780204 _dispatch_source_latch_and_call + 2556
13 libdispatch.dylib              0x18176bae4 _dispatch_source_invoke + 808
14 libdispatch.dylib              0x18176e7b0 _dispatch_main_queue_callback_4CF + 492
15 CoreFoundation                 0x181cccbb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
16 CoreFoundation                 0x181ccaa18 __CFRunLoopRun + 1628
17 CoreFoundation                 0x181bf9680 CFRunLoopRunSpecific + 384
18 GraphicsServices               0x183108088 GSEventRunModal + 180
19 UIKit                          0x186a70d90 UIApplicationMain + 204
20 CuvvaHourly                    0x10005d9dc main (main.m:17)
21 libdispatch.dylib              0x18179a8b8 (Missing)

Thread : com.appsflyer.AppsFlyerQueue
0  libsystem_kernel.dylib         0x18189d4f8 semaphore_wait_trap + 8
1  libdispatch.dylib              0x18177a55c _dispatch_semaphore_wait_slow + 244
2  libxpc.dylib                   0x1819b2a10 xpc_connection_send_message_with_reply_sync + 204
3  Security                       0x1821240d4 securityd_message_with_reply_sync + 132
4  Security                       0x182124320 securityd_send_sync_and_do + 80
5  Security                       0x182137b70 __SecItemAdd_block_invoke_2 + 520
6  Security                       0x1821395e8 __SecItemAuthDoQuery_block_invoke + 304
7  Security                       0x182136b1c SecItemAuthDo + 216
8  Security                       0x182137904 SecItemAuthDoQuery + 440
9  Security                       0x182137740 __SecItemAdd_block_invoke + 108
10 Security                       0x182136664 SecOSStatusWith + 32
11 Security                       0x1821372c8 SecItemAdd + 292
12 CuvvaHourly                    0x1003c7350 -[AppsFlyerKeychainWrapper setObject:withData:] + 148
13 CuvvaHourly                    0x1003c0d1c -[AppsFlyerTracker getAppsFlyerUID] + 356
14 CuvvaHourly                    0x1003c16fc -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:] + 812
15 CuvvaHourly                    0x1003bfd94 __42-[AppsFlyerTracker trackEvent:withValues:]_block_invoke + 300
16 libdispatch.dylib              0x181769630 _dispatch_call_block_and_release + 24
17 libdispatch.dylib              0x1817695f0 _dispatch_client_callout + 16
18 libdispatch.dylib              0x181775634 _dispatch_queue_drain + 864
19 libdispatch.dylib              0x18176d0f4 _dispatch_queue_invoke + 464
20 libdispatch.dylib              0x1817695f0 _dispatch_client_callout + 16
21 libdispatch.dylib              0x181777a88 _dispatch_root_queue_drain + 2140
22 libdispatch.dylib              0x181777224 _dispatch_worker_thread3 + 112
23 libsystem_pthread.dylib        0x18197d470 _pthread_wqthread + 1092
24 libsystem_pthread.dylib        0x18197d020 start_wqthread + 4

EXC_BAD_ACCESS
KERN_INVALID_ADDRESS
0x5000000013fe2397

iPhone 6 Plus, iOS 9.2.1 (13D15)

Crash on `[AppsFlyerKeychainWrapper prepareForKeychain:]

Getting this crash even in latest update:

#0. Crashed: com.twitter.crashlytics.ios.exception
0  PharmEasy                      0x100239910 CLSProcessRecordAllThreads + 4297496848
1  PharmEasy                      0x100239910 CLSProcessRecordAllThreads + 4297496848
2  PharmEasy                      0x1002397cc CLSProcessRecordAllThreads + 4297496524
3  PharmEasy                      0x100229930 CLSHandler + 4297431344
4  PharmEasy                      0x10023790c __CLSExceptionRecord_block_invoke + 4297488652
5  libdispatch.dylib              0x1873a61bc _dispatch_client_callout + 16
6  libdispatch.dylib              0x1873b37f0 _dispatch_barrier_sync_f_invoke + 84
7  PharmEasy                      0x1002373b0 CLSExceptionRecord + 4297487280
8  PharmEasy                      0x1002371e4 CLSExceptionRecordNSException + 4297486820
9  PharmEasy                      0x100236e04 CLSTerminateHandler() + 4297485828
10 libc++abi.dylib                0x186f4366c std::__terminate(void (*)()) + 16
11 libc++abi.dylib                0x186f42f84 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 134
12 libobjc.A.dylib                0x186f54690 _objc_exception_destructor(void*) + 362
13 CoreFoundation                 0x1883fda0c -[__NSCFNumber hash] + 926
14 PharmEasy                      0x1001ea8b0 -[AppsFlyerKeychainWrapper prepareForKeychain:] + 4297173168
15 PharmEasy                      0x1001ea710 -[AppsFlyerKeychainWrapper getObject:] + 4297172752
16 PharmEasy                      0x1001f6bd0 -[AppsFlyerTracker getKeychainData] + 4297223120
17 PharmEasy                      0x1001f6950 -[AppsFlyerTracker setOriginalAppsFlyerIdToKeychainIfNeeded:] + 4297222480
18 PharmEasy                      0x1001f6900 -[AppsFlyerTracker getAppsFlyerUID] + 4297222400
19 PharmEasy                      0x10014c078 -[PEConnection setHeaderValuesToTheRequest:] (PEConnection.m:298)
20 PharmEasy                      0x10014aa44 -[PEConnection getDataFromURL:withParameters:] (PEConnection.m:53)
21 PharmEasy                      0x100064e70 __36-[AppDelegate getSettingsFromServer]_block_invoke_2 (AppDelegate.m:488)
22 libdispatch.dylib              0x1873a61fc _dispatch_call_block_and_release + 24
23 libdispatch.dylib              0x1873a61bc _dispatch_client_callout + 16
24 libdispatch.dylib              0x1873aad68 _dispatch_main_queue_callback_4CF + 1000
25 CoreFoundation                 0x1884ca810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
26 CoreFoundation                 0x1884c83fc __CFRunLoopRun + 1660
27 CoreFoundation                 0x1883f62b8 CFRunLoopRunSpecific + 444
28 GraphicsServices               0x189eaa198 GSEventRunModal + 180
29 UIKit                          0x18e43d7fc -[UIApplication _run] + 684
30 UIKit                          0x18e438534 UIApplicationMain + 208
31 PharmEasy                      0x1001036f4 main (main.m:15)
32 libdispatch.dylib              0x1873d95b8 (Missing)

--

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x18851d1b8 __exceptionPreprocess
1  libobjc.A.dylib                0x186f5455c objc_exception_throw
2  CoreFoundation                 0x1883fda0c -[__NSCFNumber hash]
3  PharmEasy                      0x1001ea8b0 -[AppsFlyerKeychainWrapper prepareForKeychain:]
4  PharmEasy                      0x1001ea710 -[AppsFlyerKeychainWrapper getObject:]
5  PharmEasy                      0x1001f6bd0 -[AppsFlyerTracker getKeychainData]
6  PharmEasy                      0x1001f6950 -[AppsFlyerTracker setOriginalAppsFlyerIdToKeychainIfNeeded:]
7  PharmEasy                      0x1001f6900 -[AppsFlyerTracker getAppsFlyerUID]
8  PharmEasy                      0x10014c078 -[PEConnection setHeaderValuesToTheRequest:] (PEConnection.m:298)
9  PharmEasy                      0x10014aa44 -[PEConnection getDataFromURL:withParameters:] (PEConnection.m:53)
10 PharmEasy                      0x100064e70 __36-[AppDelegate getSettingsFromServer]_block_invoke_2 (AppDelegate.m:488)
11 libdispatch.dylib              0x1873a61fc _dispatch_call_block_and_release
12 libdispatch.dylib              0x1873a61bc _dispatch_client_callout
13 libdispatch.dylib              0x1873aad68 _dispatch_main_queue_callback_4CF
14 CoreFoundation                 0x1884ca810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
15 CoreFoundation                 0x1884c83fc __CFRunLoopRun
16 CoreFoundation                 0x1883f62b8 CFRunLoopRunSpecific
17 GraphicsServices               0x189eaa198 GSEventRunModal
18 UIKit                          0x18e43d7fc -[UIApplication _run]
19 UIKit                          0x18e438534 UIApplicationMain
20 PharmEasy                      0x1001036f4 main (main.m:15)
21 libdispatch.dylib              0x1873d95b8 (Missing)

#0. Crashed: com.twitter.crashlytics.ios.exception
0  PharmEasy                      0x100239910 CLSProcessRecordAllThreads + 4297496848
1  PharmEasy                      0x100239910 CLSProcessRecordAllThreads + 4297496848
2  PharmEasy                      0x1002397cc CLSProcessRecordAllThreads + 4297496524
3  PharmEasy                      0x100229930 CLSHandler + 4297431344
4  PharmEasy                      0x10023790c __CLSExceptionRecord_block_invoke + 4297488652
5  libdispatch.dylib              0x1873a61bc _dispatch_client_callout + 16
6  libdispatch.dylib              0x1873b37f0 _dispatch_barrier_sync_f_invoke + 84
7  PharmEasy                      0x1002373b0 CLSExceptionRecord + 4297487280
8  PharmEasy                      0x1002371e4 CLSExceptionRecordNSException + 4297486820
9  PharmEasy                      0x100236e04 CLSTerminateHandler() + 4297485828
10 libc++abi.dylib                0x186f4366c std::__terminate(void (*)()) + 16
11 libc++abi.dylib                0x186f42f84 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 134
12 libobjc.A.dylib                0x186f54690 _objc_exception_destructor(void*) + 362
13 CoreFoundation                 0x1883fda0c -[__NSCFNumber hash] + 926
14 PharmEasy                      0x1001ea8b0 -[AppsFlyerKeychainWrapper prepareForKeychain:] + 4297173168
15 PharmEasy                      0x1001ea710 -[AppsFlyerKeychainWrapper getObject:] + 4297172752
16 PharmEasy                      0x1001f6bd0 -[AppsFlyerTracker getKeychainData] + 4297223120
17 PharmEasy                      0x1001f6950 -[AppsFlyerTracker setOriginalAppsFlyerIdToKeychainIfNeeded:] + 4297222480
18 PharmEasy                      0x1001f6900 -[AppsFlyerTracker getAppsFlyerUID] + 4297222400
19 PharmEasy                      0x10014c078 -[PEConnection setHeaderValuesToTheRequest:] (PEConnection.m:298)
20 PharmEasy                      0x10014aa44 -[PEConnection getDataFromURL:withParameters:] (PEConnection.m:53)
21 PharmEasy                      0x100064e70 __36-[AppDelegate getSettingsFromServer]_block_invoke_2 (AppDelegate.m:488)
22 libdispatch.dylib              0x1873a61fc _dispatch_call_block_and_release + 24
23 libdispatch.dylib              0x1873a61bc _dispatch_client_callout + 16
24 libdispatch.dylib              0x1873aad68 _dispatch_main_queue_callback_4CF + 1000
25 CoreFoundation                 0x1884ca810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
26 CoreFoundation                 0x1884c83fc __CFRunLoopRun + 1660
27 CoreFoundation                 0x1883f62b8 CFRunLoopRunSpecific + 444
28 GraphicsServices               0x189eaa198 GSEventRunModal + 180
29 UIKit                          0x18e43d7fc -[UIApplication _run] + 684
30 UIKit                          0x18e438534 UIApplicationMain + 208
31 PharmEasy                      0x1001036f4 main (main.m:15)
32 libdispatch.dylib              0x1873d95b8 (Missing)

#1. Thread
0  libsystem_pthread.dylib        0x1875aed88 pthread_workqueue_addthreads_np + 126

#2. Thread
0  libsystem_kernel.dylib         0x1874eba88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1875af344 _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x1875aed8c start_wqthread + 4

#3. Thread
0  libsystem_kernel.dylib         0x1874eba88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1875af344 _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x1875aed8c start_wqthread + 4

#4. com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x1874cd188 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1874ccff8 mach_msg + 72
2  CoreFoundation                 0x1884ca5d0 __CFRunLoopServiceMachPort + 192
3  CoreFoundation                 0x1884c81ec __CFRunLoopRun + 1132
4  CoreFoundation                 0x1883f62b8 CFRunLoopRunSpecific + 444
5  Foundation                     0x188f3326c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6  Foundation                     0x188f53dd0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7  UIKit                          0x18edb1c38 -[UIEventFetcher threadMain] + 136
8  Foundation                     0x189030e68 __NSThread__start__ + 1024
9  libsystem_pthread.dylib        0x1875b1850 <redacted> + 240
10 libsystem_pthread.dylib        0x1875b1760 _pthread_start + 282
11 libsystem_pthread.dylib        0x1875aed94 thread_start + 4

#5. Thread
0  libsystem_kernel.dylib         0x1874eba88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1875af344 _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x1875aed8c start_wqthread + 4

#6. com.clevertap.serialEventQueue
0  libsystem_kernel.dylib         0x1874cd1c4 semaphore_wait_trap + 8
1  libdispatch.dylib              0x1873b87d8 _dispatch_semaphore_wait_slow + 216
2  PharmEasy                      0x100219218 -[CleverTapQueueManager _doHandshake] (CleverTapQueueManager.m:742)
3  PharmEasy                      0x1001fef88 +[CleverTapAPI runSerialAsync:] (CleverTapAPI.m:255)
4  PharmEasy                      0x1002194d8 -[CleverTapQueueManager doHandshakeAsync] (CleverTapQueueManager.m:772)
5  PharmEasy                      0x100215adc -[CleverTapQueueManager init] (CleverTapQueueManager.m:79)
6  PharmEasy                      0x1002159f8 __39+[CleverTapQueueManager sharedInstance]_block_invoke (CleverTapQueueManager.m:65)
7  libdispatch.dylib              0x1873a61bc _dispatch_client_callout + 16
8  libdispatch.dylib              0x1873a6fb0 dispatch_once_f + 56
9  PharmEasy                      0x1002159d0 +[CleverTapQueueManager sharedInstance] (once.h:75)
10 PharmEasy                      0x1001ff194 __37+[CleverTapAPI _queueEvent:withType:]_block_invoke (CleverTapAPI.m:282)
11 libdispatch.dylib              0x1873a61fc _dispatch_call_block_and_release + 24
12 libdispatch.dylib              0x1873a61bc _dispatch_client_callout + 16
13 libdispatch.dylib              0x1873b43dc _dispatch_queue_serial_drain + 928
14 libdispatch.dylib              0x1873a99a4 _dispatch_queue_invoke + 652
15 libdispatch.dylib              0x1873b48d8 _dispatch_queue_override_invoke + 360
16 libdispatch.dylib              0x1873b634c _dispatch_root_queue_drain + 572
17 libdispatch.dylib              0x1873b60ac _dispatch_worker_thread3 + 124
18 libsystem_pthread.dylib        0x1875af2a0 _pthread_wqthread + 1288
19 libsystem_pthread.dylib        0x1875aed8c start_wqthread + 4

#7. Thread
0  libsystem_kernel.dylib         0x1874eba88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1875af344 _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x1875aed8c start_wqthread + 4

#8. GAIThread
0  libsystem_kernel.dylib         0x1874cd188 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1874ccff8 mach_msg + 72
2  CoreFoundation                 0x1884ca5d0 __CFRunLoopServiceMachPort + 192
3  CoreFoundation                 0x1884c81ec __CFRunLoopRun + 1132
4  CoreFoundation                 0x1883f62b8 CFRunLoopRunSpecific + 444
5  Foundation                     0x188f3326c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
6  Foundation                     0x188f87aa0 -[NSRunLoop(NSRunLoop) run] + 88
7  PharmEasy                      0x1001b7a14 +[GAI threadMain:] + 4296964628
8  Foundation                     0x189030e68 __NSThread__start__ + 1024
9  libsystem_pthread.dylib        0x1875b1850 <redacted> + 240
10 libsystem_pthread.dylib        0x1875b1760 _pthread_start + 282
11 libsystem_pthread.dylib        0x1875aed94 thread_start + 4

#9. com.twitter.crashlytics.ios.MachExceptionServer
0  libsystem_kernel.dylib         0x1874cd188 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1874ccff8 mach_msg + 72
2  PharmEasy                      0x100224790 CLSMachExceptionServer + 4297410448
3  libsystem_pthread.dylib        0x1875b1850 <redacted> + 240
4  libsystem_pthread.dylib        0x1875b1760 _pthread_start + 282
5  libsystem_pthread.dylib        0x1875aed94 thread_start + 4

#10. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1874cd188 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x1874ccff8 mach_msg + 72
2  CoreFoundation                 0x1884ca5d0 __CFRunLoopServiceMachPort + 192
3  CoreFoundation                 0x1884c81ec __CFRunLoopRun + 1132
4  CoreFoundation                 0x1883f62b8 CFRunLoopRunSpecific + 444
5  CFNetwork                      0x188bfba70 <redacted> + 336
6  Foundation                     0x189030e68 __NSThread__start__ + 1024
7  libsystem_pthread.dylib        0x1875b1850 <redacted> + 240
8  libsystem_pthread.dylib        0x1875b1760 _pthread_start + 282
9  libsystem_pthread.dylib        0x1875aed94 thread_start + 4

#11. com.twitter.crashlytics.ios.binary-images
0  libsystem_kernel.dylib         0x1874ce570 close + 8
1  PharmEasy                      0x1002380e8 CLSFileCloseWithOffset + 4297490664
2  PharmEasy                      0x100220e6c __CLSBinaryImageChanged_block_invoke + 4297395820
3  libdispatch.dylib              0x1873a61fc _dispatch_call_block_and_release + 24
4  libdispatch.dylib              0x1873a61bc _dispatch_client_callout + 16
5  libdispatch.dylib              0x1873b43dc _dispatch_queue_serial_drain + 928
6  libdispatch.dylib              0x1873a99a4 _dispatch_queue_invoke + 652
7  libdispatch.dylib              0x1873b48d8 _dispatch_queue_override_invoke + 360
8  libdispatch.dylib              0x1873b634c _dispatch_root_queue_drain + 572
9  libdispatch.dylib              0x1873b60ac _dispatch_worker_thread3 + 124
10 libsystem_pthread.dylib        0x1875af2a0 _pthread_wqthread + 1288
11 libsystem_pthread.dylib        0x1875aed8c start_wqthread + 4

#12. Thread
0  libsystem_kernel.dylib         0x1874eae1c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x1875b09c0 <redacted> + 640
2  libc++.1.dylib                 0x186ed93ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 56
3  JavaScriptCore                 0x18ccfa5d0 <redacted> + 112
4  JavaScriptCore                 0x18ccfa544 <redacted> + 168
5  JavaScriptCore                 0x18ccfa424 <redacted> + 10
6  JavaScriptCore                 0x18ccfa6d4 <redacted> + 92
7  libsystem_pthread.dylib        0x1875b1850 <redacted> + 240
8  libsystem_pthread.dylib        0x1875b1760 _pthread_start + 282
9  libsystem_pthread.dylib        0x1875aed94 thread_start + 4

#13. Thread
0  libsystem_kernel.dylib         0x1874eba88 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x1875af344 _pthread_wqthread + 1452
2  libsystem_pthread.dylib        0x1875aed8c start_wqthread + 4


Framework Not Found when archiving

Hi there,

i have a problem when archiving with version above 4.5.1, (version 4.5.1 works like a charm).
it always said framework not found, but it runs well when build or run the project,

is there any work around that i need to do to avoid that problem ?

Thanks,

PS: i was installing via cocoapods,

pod 'AppsFlyerFramework' (failed when archiving - version 4.5.6 installed)
pod 'AppsFlyerFramework', '4.5.1' (all good)

Unable to install via cocoa pods with support for iOS 6.0

Unable to install it via cocoa pods with support for iOS 6.0.
Your documentation states that indeed it supports iOS 6.0: https://support.appsflyer.com/entries/25458906-iOS-SDK-Integration-Guide-v3-3-x-New-API-

OSX Version: El Capitán (10.11).
Cocoa pods 0.38.2
Pod file
platform :ios, 6.0'

target 'abdd' do
     pod "AFNetworking", "~> 2.5"
    pod "JSONModel"
    pod "PDKTZipArchive"
    pod "GCDWebServer", "~> 3.2.7"
    pod "AppsFlyerFramework", "~> 3.3.1"
end

Error:
*gem install cocoapods --pre

Resolving dependencies of Podfile
[!] Unable to satisfy the following requirements:

  • AppsFlyerFramework (~> 3.3.1) required by Podfile

/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:388:in handle_resolver_error' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:69:inrescue in resolve'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:56:in resolve' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:535:inblock in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:533:inresolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:70:in analyze' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:210:inanalyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:133:in block in resolve_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:insection'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:132:in resolve_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:104:ininstall!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:71:in run_install_with_update' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command/project.rb:101:inrun'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:312:in run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:inrun'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in <top (required)>' /usr/local/bin/pod:23:inload'
/usr/local/bin/pod:23:in `

'
*
Reason:
Even though your documentation states that the framework works on iOS 6 and above, the podspecs says 7.0

spec.platform = :ios, '7.0'

Please correct your pod specs or the documentation of the SDK

Crash callServerWithEventName Crashed: com.apple.root.default-qos SIGABRT ABORT

iOS 10, framework version 4.7.11

Crashed: com.apple.root.default-qos
SIGABRT ABORT 0x000000001c8cdacc
0  libsystem_kernel.dylib         0x1c8cdacc __pthread_kill + 8
1  libsystem_pthread.dylib        0x1c986087 pthread_kill + 62
2  libsystem_c.dylib              0x1c86295b abort + 108
3  libsystem_malloc.dylib         0x1c9070e5 free + 578
4  libobjc.A.dylib                0x1c3916d3 object_dispose + 20
5  CoreFoundation                 0x1d028c19 -[__NSDate dealloc] + 40
6  libobjc.A.dylib                0x1c3a1259 objc_object::sidetable_release(bool) + 238
7  MYAPP              0x3cc17d -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 3797373
8  MYAPP              0x3cb863 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 3795043
9  MYAPP              0x3cb82b -[AppsFlyerTracker callServerWithEventName:] + 3794987
10 MYAPP              0x3c7ad1 __34-[AppsFlyerTracker trackAppLaunch]_block_invoke + 3779281
11 iAd                            0x2a7d1d8b __48-[ADSession requestAttributionDetailsWithBlock:]_block_invoke_3 + 196
12 libdispatch.dylib              0x1c7cd797 _dispatch_call_block_and_release + 10
13 libdispatch.dylib              0x1c7dab1d _dispatch_queue_override_invoke + 536
14 libdispatch.dylib              0x1c7dc1b5 _dispatch_root_queue_drain + 326
15 libdispatch.dylib              0x1c7dc00f _dispatch_worker_thread3 + 106
16 libsystem_pthread.dylib        0x1c98287d _pthread_wqthread + 1040
17 libsystem_pthread.dylib        0x1c98245c start_wqthread + 8

Memory leaks reported after putting the app into the background

Hi,

I am profiling my app and I can see some memory leaks caused by AppsFlyer SDK when I put my app into the background.

They seem to be caused by the internal call [AppsFlyerTracker backgroundstatCall] than happens when the app is moved to the background

I am currently using version 3.3.3 of AppsFlyer SDK.

Steps to reproduce it

- Start running my app - Put my app into the background - Bring my app to the foreground - Memory leaks appear

Screenshot

screen shot 2015-11-16 at 11 10 48

ATS not supported

After upgrading to 3.3.1 and running on iOS 9.1 beta, I see the following log messages:

AppsFlyer Connection failed! Error - The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

Appsflyer 4.3.5 static lib lacks x86_64 architecture

It is not possible to compile app including new version of SDK in simulator.

Hi guys, sorry for posting it in this repo. version of 3.3.3:

file AF-iOS-SDK-v3.3.3/libAppsFlyerLib.a

/Users/lebedzeu/Downloads/AF-iOS-SDK-v3.3.3/libAppsFlyerLib.a: Mach-O universal binary with 4 architectures
/Users/lebedzeu/Downloads/AF-iOS-SDK-v3.3.3/libAppsFlyerLib.a (for architecture armv7): current ar archive random library
/Users/lebedzeu/Downloads/AF-iOS-SDK-v3.3.3/libAppsFlyerLib.a (for architecture i386):  current ar archive random library
/Users/lebedzeu/Downloads/AF-iOS-SDK-v3.3.3/libAppsFlyerLib.a (for architecture x86_64):    current ar archive random library
/Users/lebedzeu/Downloads/AF-iOS-SDK-v3.3.3/libAppsFlyerLib.a (for architecture arm64): current ar archive random library

however 4.3.5 lacks simulator slice:

 file ~/Downloads/AF-iOS-SDK-v4.3.5/libAppsFlyerLib.a

/Users/lebedzeu/Downloads/AF-iOS-SDK-v4.3.5/libAppsFlyerLib.a: Mach-O universal binary with 3 architectures
/Users/lebedzeu/Downloads/AF-iOS-SDK-v4.3.5/libAppsFlyerLib.a (for architecture arm64): current ar archive random library
/Users/lebedzeu/Downloads/AF-iOS-SDK-v4.3.5/libAppsFlyerLib.a (for architecture armv7): current ar archive random library
/Users/lebedzeu/Downloads/AF-iOS-SDK-v4.3.5/libAppsFlyerLib.a (for architecture armv7s):    current ar archive random library

Carthage support?

Hello,

We are wondering if there is any way this library could be used with Carthage?

If we add this repo to our Cartfile, we see

Failed to read file or folder at /private/var/folders/mt/xyqwwnr92dgbg8987kt45prr0000gn/T/carthage-archive.xJC5gC/__MACOSX/Carthage/Build/iOS/AppsFlyer.framework: Error Domain=com.antitypical.Result Code=0 "the DTSDKName key in its plist file is missing" UserInfo={com.antitypical.Result.function=readFailed, NSLocalizedDescription=the DTSDKName key in its plist file is missing, com.antitypical.Result.line=776, com.antitypical.Result.file=/tmp/carthage20160413-39362-hmnet1/Source/CarthageKit/Project.swift}

Any help in getting the framework file generated for use with Carthage would be greatly appreciated.
Cheers,

Crashed: com.af.sdk on iOS 10.2.0, 10.2.1

We are getting some crashes in fabric.

AppsFlyerFramework: 4.7.3

Crashed: com.af.sdk
0  libsystem_kernel.dylib         0x185057014 __pthread_kill + 8
1  libsystem_pthread.dylib        0x18511f450 pthread_kill + 112
2  libsystem_c.dylib              0x184fcb400 abort + 140
3  libsystem_malloc.dylib         0x18509ba5c _nano_vet_and_size_of_live + 330
4  libsystem_malloc.dylib         0x18509d028 nano_realloc + 648
5  libsystem_malloc.dylib         0x18508f240 malloc_zone_realloc + 180
6  CoreFoundation                 0x186047958 __CFStringCreateImmutableFunnel3 + 692
7  CoreFoundation                 0x185f5da60 CFStringCreateWithBytes + 44
8  MYAPP                          0x100485dac +[AppsFlyerUtils getJsonStringFromDictionary:] + 4299447724
9  MYAPP                          0x10048f030 -[AppsFlyerTracker encryptData:] + 4299485232
10 MYAPP                          0x10048fae0 -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 4299487968
11 MYAPP                          0x10048b4ec __42-[AppsFlyerTracker trackEvent:withValues:]_block_invoke + 4299470060
12 libdispatch.dylib              0x184f121bc _dispatch_client_callout + 16
13 libdispatch.dylib              0x184f1ef94 _dispatch_continuation_pop + 576
14 libdispatch.dylib              0x184f2b634 _dispatch_source_latch_and_call + 204
15 libdispatch.dylib              0x184f14160 _dispatch_source_invoke + 820
16 libdispatch.dylib              0x184f20210 _dispatch_queue_serial_drain + 468
17 libdispatch.dylib              0x184f159a4 _dispatch_queue_invoke + 652
18 libdispatch.dylib              0x184f208d8 _dispatch_queue_override_invoke + 360
19 libdispatch.dylib              0x184f2234c _dispatch_root_queue_drain + 572
20 libdispatch.dylib              0x184f220ac _dispatch_worker_thread3 + 124
21 libsystem_pthread.dylib        0x18511b2a0 _pthread_wqthread + 1288
22 libsystem_pthread.dylib        0x18511ad8c start_wqthread + 4

Track event:

AppsFlyerTracker.shared().trackEvent('EventName', withValues: [:])

Crash on launch with url scheme

Here's a stack trace. The crash happens on launch right after applicationDidFinishLaunching is called

* thread #1: tid = 0x4d2a00, 0x0000000112740dbb libobjc.A.dylib`objc_exception_throw, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
    frame #0: 0x0000000112740dbb libobjc.A.dylib`objc_exception_throw
    frame #1: 0x000000011313cd3d CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    frame #2: 0x0000000113082cfa CoreFoundation`___forwarding___ + 970
    frame #3: 0x00000001130828a8 CoreFoundation`__forwarding_prep_0___ + 120
    frame #4: 0x0000000113113851 CoreFoundation`_CFURLCreateWithURLString + 81
    frame #5: 0x000000010fc1fc35 Foundation`-[NSURL(NSURL) initWithString:relativeToURL:] + 349
    frame #6: 0x000000010fc1fab2 Foundation`+[NSURL(NSURL) URLWithString:relativeToURL:] + 59
    frame #7: 0x000000010e20ea67 Job Search`-[AppsFlyerTracker handleDidFinishLaunch:] + 271
    frame #8: 0x00000001130fdc8c CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    frame #9: 0x00000001130fd9cb CoreFoundation`_CFXRegistrationPost + 427
    frame #10: 0x00000001130fd732 CoreFoundation`___CFXNotificationPost_block_invoke + 50
    frame #11: 0x00000001131461e2 CoreFoundation`-[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1986
    frame #12: 0x0000000112ff5679 CoreFoundation`_CFXNotificationPost + 633
    frame #13: 0x000000010fbf8cd9 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    frame #14: 0x0000000110645f66 UIKit`-[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4272
    frame #15: 0x000000011064c568 UIKit`-[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
    frame #16: 0x0000000110649714 UIKit`-[UIApplication workspaceDidEndTransaction:] + 188
    frame #17: 0x00000001153788c8 FrontBoardServices`__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    frame #18: 0x0000000115378741 FrontBoardServices`-[FBSSerialQueue _performNext] + 178
    frame #19: 0x0000000115378aca FrontBoardServices`-[FBSSerialQueue _performNextFromRunLoopSource] + 45
    frame #20: 0x0000000113059301 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    frame #21: 0x000000011304f22c CoreFoundation`__CFRunLoopDoSources0 + 556
    frame #22: 0x000000011304e6e3 CoreFoundation`__CFRunLoopRun + 867
    frame #23: 0x000000011304e0f8 CoreFoundation`CFRunLoopRunSpecific + 488
    frame #24: 0x0000000110648f21 UIKit`-[UIApplication _run] + 402
    frame #25: 0x000000011064df09 UIKit`UIApplicationMain + 171
  * frame #26: 0x000000010deeffd7 Job Search`main(argc=1, argv=0x00007fff51d13bc8) + 151 at main.m:15
    frame #27: 0x0000000113c0592d libdyld.dylib`start + 1
    frame #28: 0x0000000113c0592d libdyld.dylib`start + 1

pod install not working

I'm trying to "pod install" AppsFlyerFramework, but it fails with error:

Installing AppsFlyerFramework (4.3.5)
[!] Error installing AppsFlyerFramework
[!] /usr/bin/git clone https://github.com/AppsFlyerSDK/AppsFlyerFramework.git /var/folders/0g/vg7bgzrd04bf14l3ng8t1ghr0000gn/T/d20160117-28555-13blp5l --single-branch --depth 1 --branch 4.3.5

Cloning into '/var/folders/0g/vg7bgzrd04bf14l3ng8t1ghr0000gn/T/d20160117-28555-13blp5l'...
warning: Could not find remote branch 4.3.5 to clone.
fatal: Remote branch 4.3.5 not found in upstream origin

my pod file contains this line: "pod ‘AppsFlyerFramework’"
changing it to "pod 'AppsFlyerFramework', '~> 4.3'" didn't help

typos in header file

typo 1

#define AFEventOrderId                  @"af_order_id"

should be AFEventParamOrderId

#define AFEventParamOrderId                  @"af_order_id"

typo 2

- (void) handleOpenUrl:(NSURL *) url options:(NSDictionary *)options;

should be handleOpenURL (URL in uppercase)

- (void) handleOpenURL:(NSURL *) url options:(NSDictionary *)options;

Crashed: com.af.sdk

We are getting some crashes in fabric. Stack trace:

Crashed: com.af.sdk
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0003000000000010

_0 CoreFoundation 0x1811ecc68 __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 52
1 CoreFoundation 0x1811ecb84 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 180
2 Foundation 0x181d53770 +[_NSJSONReader validForJSON:depth:allowFragments:] + 196
3 Foundation 0x181d53a90 __51+[_NSJSONReader validForJSON:depth:allowFragments:]_block_invoke + 116
4 CoreFoundation 0x18125244c __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 88
5 CoreFoundation 0x1812400f0 -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 224
6 Foundation 0x181d53770 +[_NSJSONReader validForJSON:depth:allowFragments:] + 196
7 App Name 0x1003d1e84 -[AppsFlyerTracker callServerWithEventName:value:withDictionary:isEvent:isNewAPI:] + 4298907268
8 App Name 0x1003cfa98 -[AppsFlyerTracker callServerWithEventName:value:isInAppEvent:isNewAPI:] + 4298898072
9 libdispatch.dylib 0x180d514bc _dispatch_call_block_and_release + 24
10 libdispatch.dylib 0x180d5147c _dispatch_client_callout + 16
11 libdispatch.dylib 0x180d5cd08 _dispatch_after_timer_callback + 92
12 libdispatch.dylib 0x180d5147c _dispatch_client_callout + 16
13 libdispatch.dylib 0x180d68090 _dispatch_source_latch_and_call + 2556
14 libdispatch.dylib 0x180d53970 _dispatch_source_invoke + 808
15 libdispatch.dylib 0x180d5d694 _dispatch_queue_drain + 1332
16 libdispatch.dylib 0x180d54f80 _dispatch_queue_invoke + 464
17 libdispatch.dylib 0x180d5f390 _dispatch_root_queue_drain + 728
18 libdispatch.dylib 0x180d5f0b0 _dispatch_worker_thread3 + 112
19 libsystem_pthread.dylib 0x180f69470 pthread_wqthread + 1092
20 libsystem_pthread.dylib 0x180f69020 start_wqthread + 4

HandleOpenURL issues

We're having issues with the following call:

AppsFlyerTracker.sharedTracker().handleOpenURL(url, sourceApplication: sourceApplication, withAnnotaion: annotation)

It is crashing the app very infrequently and we're not sure why. We've had AppsFlyer integrated into our app for some time now. Can't seem to figure out what is causing it.

In addition to this:

  • It should be optimized to return a boolean to allow for halting the OpenURL call at that point. Any reason it doesn't?
  • "withAnnotation" is spelled wrong.

App crashed when handleOpenURL called in deep link

The log is below:

  • openURL url = tslot://
    2017-02-14 14:43:55.313137 SlotsGame_pro iOS[1123:292314] AppsFlyerTracker
    2017-02-14 14:43:55.313304 SlotsGame_pro iOS[1123:292314] key: UIApplicationOpenURLOptionsSourceApplicationKey value: com.apple.mobilesafari
    2017-02-14 14:43:55.313519 SlotsGame_pro iOS[1123:292314] key: UIApplicationOpenURLOptionsOpenInPlaceKey value: 0
    2017-02-14 14:43:55.313674 SlotsGame_pro iOS[1123:292314] version = version: 4.6.3 (build 520)
    2017-02-14 14:43:55.313921 SlotsGame_pro iOS[1123:292314] -[AppsFlyerTracker handleOpenURL:options:]: unrecognized selector sent to instance 0x1743657c0
    2017-02-14 14:43:55.318322 SlotsGame_pro iOS[1123:292314] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppsFlyerTracker handleOpenURL:options:]: unrecognized selector sent to instance 0x1743657c0'
    *** First throw call stack:
    (0x1924291b8 0x190e6055c 0x192430268 0x19242d270 0x19232680c 0x100153dd8 0x10035bbb8 0x19856e624 0x19856e0b0 0x198576354 0x19857ae60 0x19857a280 0x198565820 0x1985654a4 0x19889153c 0x193fd1dd4 0x193fff92c 0x193fff798 0x193fffb40 0x1923d6b5c 0x1923d64a4 0x1923d40a4 0x1923022b8 0x193db6198 0x1983497fc 0x198344534 0x100147f14 0x1912e55b8)
    libc++abi.dylib: terminating with uncaught exception of type NSException

Anyone met the same problems?
SDK works well in ios 8.1.Only crashed in IOS 10+

4.4.5 only supported on iOS 8.0?

embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/AppsFlyerTracker.framework/AppsFlyerTracker) for architecture i386

Undefined symbols on 4.4.1

Hi AppFlyer team,

I was just adding my app with AppsFlyer 4.4.1 as a framework. After I added the framework to link Binary with Libraries, I run my app and I got following errors:

Undefined symbols for architecture x86_64:
"_SecItemAdd", referenced from:
-[AppsFlyerKeychainWrapper setObject:withData:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
(maybe you meant: _fbdfl_SecItemAdd)
"_SecItemCopyMatching", referenced from:
-[AppsFlyerKeychainWrapper getObject:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
(maybe you meant: _fbdfl_SecItemCopyMatching)
"_SecItemDelete", referenced from:
-[AppsFlyerKeychainWrapper remove:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
(maybe you meant: _fbdfl_SecItemDelete)
"_SecItemUpdate", referenced from:
-[AppsFlyerKeychainWrapper update::] in AppsFlyer(AppsFlyerKeychainWrapper.o)
(maybe you meant: _fbdfl_SecItemUpdate)
"_kSecAttrAccessGroup", referenced from:
-[AppsFlyerKeychainWrapper prepareForKeychain:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecAttrAccessible", referenced from:
-[AppsFlyerKeychainWrapper prepareForKeychain:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecAttrAccessibleAlwaysThisDeviceOnly", referenced from:
-[AppsFlyerKeychainWrapper prepareForKeychain:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecAttrAccount", referenced from:
-[AppsFlyerKeychainWrapper prepareForKeychain:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecAttrGeneric", referenced from:
-[AppsFlyerKeychainWrapper prepareForKeychain:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecAttrService", referenced from:
-[AppsFlyerKeychainWrapper prepareForKeychain:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecClass", referenced from:
-[AppsFlyerKeychainWrapper prepareForKeychain:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecClassGenericPassword", referenced from:
-[AppsFlyerKeychainWrapper prepareForKeychain:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecMatchLimit", referenced from:
-[AppsFlyerKeychainWrapper getObject:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecMatchLimitOne", referenced from:
-[AppsFlyerKeychainWrapper getObject:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecReturnData", referenced from:
-[AppsFlyerKeychainWrapper getObject:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
"_kSecValueData", referenced from:
-[AppsFlyerKeychainWrapper setObject:withData:] in AppsFlyer(AppsFlyerKeychainWrapper.o)
-[AppsFlyerKeychainWrapper update::] in AppsFlyer(AppsFlyerKeychainWrapper.o)

I've tried to clean & rebuild the project on xcode 7, but nothing changes. My app support for minimum OS 7.0.
Could you guys help me solve this issue ?

Thank you.

failed to compile bitcode for AppsFlyerTracker

Trying to export for Ad Hoc (Enterprise). Worked fine every time until I upgraded my pod AppsFlyerFramework from version 4.5.3 to 4.5.9 -- Once I updated the pod I started getting this error. I followed the instructions in the GitHub README, and also on the AppsFlyer iOS SDK website. Neither fixed the issue.

Again, this started when I upgraded from 4.5.3 to 4.5.9

Dev environment:

  • Xcode 7.3.1
  • Swift 2.3
  • Cocoapods 0.39.0
    Debug: SDK path: /Applications/Xcode7.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk
    Debug: PATH: ['/Applicat…

I downgraded back to 4.5.3 and rebuilt + export and it worked flawlessly. Then installed AppsFlyerFramework 4.5.9 again…still failed.

If I disable Rebuild using Bitcode (not desirable) during the Ad Hoc export process it works fine.

No information sent about the device on first app launch from non-organic install

Hello,
I'm experiencing the issue on a single device, but everything works fine on the rest of devices. The device is whitelisted.
Tested with AppsFlyer SDK version 4.5.12 and 4.7.3, the device's iOS version is 10.1.1.
I have tested the same case on a device with the same iOS version - everything is fine there, the problem appears only on a single device.

The AppsFlyer framework has been integrated using this guide.

The steps that lead to the issue are the following:

  1. Paste the link with an ad-campaign to a browser.
  2. The alert with a suggestion to open the App Store will appear. Choose "Open".
  3. Install the app from the App Store and open it.
  4. The logs that contain AppsFlyer's mention from the connected device are the following:
Apr 20 15:47:36 iPad-Pro-1011 AppName[1045] <Notice>: AppsFlyer SDK version 4.7.3 started build (541)

There is no mention that the device's information is sent to an AppsFlyer's server, neither no conversion data is received.

  1. Close the app and open it again The second launch of the app works fine and the logs are:
Apr 20 16:18:18 iPad-Pro-1011 AppName[1061] <Notice>: AppsFlyer SDK version 4.7.3 started build (541)
// Here comes a lot of logs about communication with AppsFlyer's servers.
Apr 20 16:18:18 iPad-Pro-1011 AppName[1061] <Notice>: AppsFlyer: sent information to server, status = 200
Apr 20 16:18:18 iPad-Pro-1011 AppName[1061] <Notice>: This is a none organic install. Media source: MediaSourceName
Campaign: CampaignName

In step 4 I'm expecting the same result like in step 5.
Why does this happen?

Thank you.

Carthage only works with 4.7.2, does not work with 4.7.3

After running carthage bootstrap, the binary for 4.7.3 is being downloaded but nothing is being extracted in Carthage/Build/iOS/.

Reverting back to 4.7.2 has fixed the problem and files are being extracted as expected.

Xcode 8.3
Carthage 0.19.1

Breaking change in patch build

You removed handleOpenURL:sourceApplication:withAnnotaion: with a patch version change. This is a breaking change and should really have been reserved for a major version change.

Could you try and keep to semver in the future please? It could have just been flagged as deprecated.

error: Invalid bitcode version (Producer: '800.0.42.1_0' Reader: '703.0.31_0')

Trying to Archive my project so that I can upload to AppStore and distribute Ad Hoc (Enterprise). Worked fine every time until I upgraded my pod AppsFlyerFramework from version 4.5.3 to 4.5.12 -- Once I updated the pod I started getting this error. I followed the instructions in the GitHub README, and also on the AppsFlyer iOS SDK website. Neither fixed the issue.

Again, this started when I upgraded from 4.5.3 to 4.5.12

Dev environment:

  • Xcode 7.3.1
  • Swift 2.3
  • Cocoapods 1.1.1
error: Invalid bitcode version (Producer: '800.0.42.1_0' Reader: '703.0.31_0')
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I downgraded back to 4.5.3 and rebuilt + archive/export and it worked flawlessly. Then installed AppsFlyerFramework 4.5.12 again…still failed.

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.