From 093e9a2687edb796e9fa08296de5c13085e36fe6 Mon Sep 17 00:00:00 2001 From: Ernest Cho Date: Tue, 17 Dec 2019 14:57:19 -0800 Subject: [PATCH] SDK-716 roll back last change, it doesn't work. --- Branch-SDK/Branch-SDK/Branch.m | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/Branch-SDK/Branch-SDK/Branch.m b/Branch-SDK/Branch-SDK/Branch.m index 9cd825039..25e57b70f 100644 --- a/Branch-SDK/Branch-SDK/Branch.m +++ b/Branch-SDK/Branch-SDK/Branch.m @@ -121,9 +121,6 @@ @interface Branch() { // 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; @@ -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; @@ -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. @@ -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]; } }