Skip to content

Commit

Permalink
SDK-716 roll back last change, it doesn't work.
Browse files Browse the repository at this point in the history
  • Loading branch information
echo-branch committed Dec 17, 2019
1 parent 7d5c034 commit 093e9a2
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions Branch-SDK/Branch-SDK/Branch.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ @interface Branch() <BranchDeepLinkingControllerCompletionDelegate> {
// This isolation queue protects branch initialization and ensures things are processed in order.
@property (nonatomic, strong, readwrite) dispatch_queue_t isolationQueue;

// SDK-716 used to confirm init is on queue
@property (nonatomic, assign, readwrite) BOOL initSessionHasBeenCalled;

@property (strong, nonatomic) BNCServerInterface *serverInterface;
@property (strong, nonatomic) BNCServerRequestQueue *requestQueue;
@property (strong, nonatomic) dispatch_semaphore_t processing_sema;
Expand Down Expand Up @@ -232,7 +229,6 @@ - (id)initWithInterface:(BNCServerInterface *)interface

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

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

[self.class addBranchSDKVersionToCrashlyticsReport];

@synchronized (self) {
self.initSessionHasBeenCalled = YES;
}

self.shouldAutomaticallyDeepLink = automaticallyDisplayController;

// If the SDK is already initialized, this means that initSession was called after other lifecycle calls.
Expand Down Expand Up @@ -1972,16 +1963,8 @@ - (void)clearNetworkQueue {
// Some methods require init before they are called. Instead of returning an error, we try to fix the situation by calling init ourselves.
// There is a follow up ticket to improve this. SDK-633
- (void)initSafetyCheck {

// SDK-716 user has already queued init via initSession
@synchronized (self) {
if (self.initSessionHasBeenCalled) {
return;
}
}

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

0 comments on commit 093e9a2

Please sign in to comment.