segment-integrations / analytics-ios-integration-taplytics

The Taplytics analytics-ios integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call Taplytics async on `track` calls

ladanazita opened this issue · comments

To resolve @bbernberg deadlock issue:

image

Taplytics also dispatches to main thread synchronously within logEvent:value:metadata method. To resolve this, we will wrap track in

#define dispatch_main_async_safe(block)\
if ([NSThread isMainThread]) {\
    block();\
} else {\
    dispatch_async(dispatch_get_main_queue(), block);\
}