alooi14 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 1 forks source link

Dispatch completion handler fired multiple times #585

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Name of affected component: Mobile Tracking

Name of related library and version: Google Analytics Services SDK 3.10 for iOS

Issue summary:
    The completion block passed to the dispatchWithCompletionHandler is fired multiple times if dispatch and dispatchWithCompletionHandler are invoked simultaneously

Steps to reproduce issue:
    id <GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:@"YOUR-UA-CODE-HERE"];
    [tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"event"
                                                          action:@"action"
                                                           label:@"label"
                                                           value:@(1)] build]];

    [[GAI sharedInstance] dispatch];
    [[GAI sharedInstance] dispatchWithCompletionHandler:^(GAIDispatchResult result) {
        NSLog(@"Dispatch completed");
    }];

Expected output:
"Dispatch completed" is displayed once in the console.

Actual results:
"Dispatch completed" is displayed twice in the console.

Notes:
You will find attached a demo project to reproduce the issue.

Original issue reported on code.google.com by thomas.b...@gmail.com on 17 Feb 2015 at 8:06

Attachments: