Skip to content

Commit

Permalink
Merge pull request #983 from BranchMetrics/INTENG-7730-fix-logEvent-e…
Browse files Browse the repository at this point in the history
…rror

SDK-713 fix log event error
  • Loading branch information
echo-branch authored Dec 18, 2019
2 parents a9d8c47 + 093e9a2 commit d5630a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Branch-SDK/Branch-SDK/Branch.h
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
__attribute__((deprecated(("This API is deprecated. Please use BranchEvent:BranchStandardEventViewItem instead."))));

- (void) sendServerRequest:(BNCServerRequest*)request;
- (void) sendServerRequestWithoutSession:(BNCServerRequest*)request;
- (void) sendServerRequestWithoutSession:(BNCServerRequest*)request __attribute__((deprecated(("This API is deprecated. Please use sendServerRequest instead."))));

/**
This is the block that is called each time a new Branch session is started. It is automatically set
Expand Down
8 changes: 4 additions & 4 deletions Branch-SDK/Branch-SDK/Branch.m
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ - (id)initWithInterface:(BNCServerInterface *)interface

// Initialize instance variables
self.isolationQueue = dispatch_queue_create([@"branchIsolationQueue" UTF8String], DISPATCH_QUEUE_SERIAL);

_serverInterface = interface;
_serverInterface.preferenceHelper = preferenceHelper;
_requestQueue = queue;
Expand Down Expand Up @@ -603,7 +604,6 @@ - (void)initSessionWithLaunchOptions:(NSDictionary *)options
automaticallyDisplayController:(BOOL)automaticallyDisplayController {

[self.class addBranchSDKVersionToCrashlyticsReport];

self.shouldAutomaticallyDeepLink = automaticallyDisplayController;

// If the SDK is already initialized, this means that initSession was called after other lifecycle calls.
Expand Down Expand Up @@ -1052,9 +1052,9 @@ - (void)sendServerRequest:(BNCServerRequest*)request {
});
}

// deprecated, use sendServerRequest
- (void)sendServerRequestWithoutSession:(BNCServerRequest*)request {
[self.requestQueue enqueue:request];
[self processNextQueueItem];
[self sendServerRequest:request];
}

- (void)sendCommerceEvent:(BNCCommerceEvent *)commerceEvent metadata:(NSDictionary*)metadata withCompletion:(void (^)(NSDictionary *, NSError *))completion {
Expand Down Expand Up @@ -1964,7 +1964,7 @@ - (void)clearNetworkQueue {
// There is a follow up ticket to improve this. SDK-633
- (void)initSafetyCheck {
if (self.initializationStatus == BNCInitStatusUninitialized) {
BNCLogWarning(@"Branch avoided an error by preemptively initializing.");
BNCLogDebug(@"Branch avoided an error by preemptively initializing.");
[self initUserSessionAndCallCallback:NO];
}
}
Expand Down
2 changes: 1 addition & 1 deletion Branch-SDK/Branch-SDK/BranchEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ - (void) logEvent {

NSDictionary *eventDictionary = [self buildEventDictionary];
BranchEventRequest *request = [self buildRequestWithEventDictionary:eventDictionary];
[[Branch getInstance] sendServerRequestWithoutSession:request];
[[Branch getInstance] sendServerRequest:request];
}

- (BranchEventRequest *)buildRequestWithEventDictionary:(NSDictionary *)eventDictionary {
Expand Down

0 comments on commit d5630a5

Please sign in to comment.