Skip to content

Commit d256bca

Browse files
fix applicationDidBecomeActive
1 parent 59c079f commit d256bca

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Branch-SDK/Branch-SDK/Branch.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,12 +1798,12 @@ - (void)registerViewWithParams:(NSDictionary *)params andCallback:(callbackWithP
17981798
#pragma mark - Application State Change methods
17991799

18001800
- (void)applicationDidBecomeActive {
1801-
// if (!Branch.trackingDisabled) {
1802-
// if ((self.initializationStatus != BNCInitStatusInitialized) &&
1803-
// ![self.requestQueue containsInstallOrOpen]) {
1804-
// [self initUserSessionAndCallCallback:YES];
1805-
// }
1806-
// }
1801+
if (!Branch.trackingDisabled &&
1802+
self.initializationStatus != BNCInitStatusInitialized &&
1803+
[self.requestQueue containsInstallOrOpen] &&
1804+
self.delayedInitBlock == nil) {
1805+
[self initUserSessionAndCallCallback:YES];
1806+
}
18071807
}
18081808

18091809
- (void)applicationWillResignActive {

Branch-TestBed/Branch-SDK-Unhosted-Tests/BNCDelayedInitSessionTests.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ - (void)testDispatchInitSession {
4848
[self waitForExpectationsWithTimeout:4 handler:^(NSError * _Nullable error) {
4949
NSLog(@"%@", error);
5050
}];
51-
52-
5351
}
5452

5553
- (void)testCancelDelayedInitSession {

0 commit comments

Comments
 (0)