Skip to content

Commit 100a61c

Browse files
committed
Release 3.14.0 Updates.
1 parent 0fc0c3e commit 100a61c

62 files changed

Lines changed: 1558 additions & 155 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
//
2+
// BranchDisableNextForegroundTests.m
3+
// Branch-SDK-Tests
4+
//
5+
// Created by Nidhi Dixit on 02/09/26.
6+
// Copyright © 2025 Branch, Inc. All rights reserved.
7+
//
8+
9+
10+
#import <XCTest/XCTest.h>
11+
#import "Branch.h"
12+
13+
@interface Branch (DisableNextForegroundTest)
14+
+ (BOOL)automaticOpenTrackingDisabled;
15+
@end
16+
17+
@interface BranchDisableNextForegroundTests : XCTestCase
18+
@end
19+
20+
@implementation BranchDisableNextForegroundTests
21+
22+
- (void)tearDown {
23+
[Branch resumeSession];
24+
[super tearDown];
25+
}
26+
27+
- (void)testDisableNextForeground_SetsFlag {
28+
[Branch disableNextForeground];
29+
XCTAssertTrue([Branch automaticOpenTrackingDisabled], @"disableNextForeground should set flag to YES");
30+
}
31+
32+
- (void)testDisableNextForegroundForTimeInterval_SetsFlag {
33+
[Branch disableNextForegroundForTimeInterval:33.0];
34+
XCTAssertTrue([Branch automaticOpenTrackingDisabled], @"disableNextForegroundForTimeInterval should set flag to YES");
35+
}
36+
37+
- (void)testResumeSession_ClearsFlag {
38+
[Branch disableNextForegroundForTimeInterval:60.0];
39+
XCTAssertTrue([Branch automaticOpenTrackingDisabled]);
40+
41+
[Branch resumeSession];
42+
XCTAssertFalse([Branch automaticOpenTrackingDisabled], @"resumeSession should set flag to NO");
43+
}
44+
45+
- (void)testResumeSession_WhenNotDisabled_IsSafe {
46+
[Branch resumeSession];
47+
XCTAssertFalse([Branch automaticOpenTrackingDisabled], @"resumeSession when not disabled should leave flag NO");
48+
}
49+
50+
- (void)testZeroTimeout_SetsFlag_NoTimer {
51+
[Branch disableNextForegroundForTimeInterval:0];
52+
XCTAssertTrue([Branch automaticOpenTrackingDisabled], @"Zero timeout should set flag to YES");
53+
54+
XCTestExpectation *wait = [self expectationWithDescription:@"Wait"];
55+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(33.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
56+
XCTAssertTrue([Branch automaticOpenTrackingDisabled], @"Flag should remain YES without manual resumeSession");
57+
[wait fulfill];
58+
});
59+
[self waitForExpectationsWithTimeout:34.0 handler:nil];
60+
}
61+
62+
- (void)testTimerAutoResumes_ClearsFlag {
63+
[Branch disableNextForegroundForTimeInterval:3.0];
64+
XCTAssertTrue([Branch automaticOpenTrackingDisabled], @"Flag should be YES immediately");
65+
66+
XCTestExpectation *wait = [self expectationWithDescription:@"Timer fires"];
67+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
68+
XCTAssertFalse([Branch automaticOpenTrackingDisabled], @"Timer should auto-resume and clear flag");
69+
[wait fulfill];
70+
});
71+
[self waitForExpectationsWithTimeout:4.0 handler:nil];
72+
}
73+
74+
- (void)testSecondCall_CancelsFirstTimer {
75+
[Branch disableNextForegroundForTimeInterval:0.5];
76+
[Branch disableNextForegroundForTimeInterval:10.0];
77+
78+
XCTestExpectation *wait = [self expectationWithDescription:@"First timer cancelled"];
79+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
80+
XCTAssertTrue([Branch automaticOpenTrackingDisabled], @"Second call should have cancelled first timer, flag still YES");
81+
[wait fulfill];
82+
});
83+
[self waitForExpectationsWithTimeout:3.0 handler:nil];
84+
}
85+
86+
- (void)testDisableNextForeground_ResumeRestores {
87+
[Branch disableNextForeground];
88+
XCTAssertTrue([Branch automaticOpenTrackingDisabled]);
89+
90+
[Branch resumeSession];
91+
XCTAssertFalse([Branch automaticOpenTrackingDisabled]);
92+
}
93+
94+
@end

Branch-TestBed/Branch-TestBed.xcodeproj/Branch-TestBed.xctestplan

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
"testTargets" : [
2828
{
2929
"skippedTests" : [
30+
"UITestCaseMisc",
31+
"UITestCaseMisc\/testCreateAndOpenURL",
32+
"UITestCaseMisc\/testFBParams",
33+
"UITestCaseMisc\/testReferringParams",
34+
"UITestCaseMisc\/testShareLink",
3035
"UITestSafari",
3136
"UITestSafari\/testDeepLinking"
3237
],

Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
C15CC9E02ABCF8C8003CC339 /* BranchActivityItemTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C15CC9DF2ABCF8C8003CC339 /* BranchActivityItemTests.m */; };
230230
C1614D56285BC8A00098946B /* LinkPresentation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1614D55285BC8A00098946B /* LinkPresentation.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
231231
C17DAF7B2AC20C2000B16B1A /* BranchClassTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C17DAF7A2AC20C2000B16B1A /* BranchClassTests.m */; };
232+
AA12345600010000000000B1 /* BranchDisableNextForegroundTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AA12345600010000000000A1 /* BranchDisableNextForegroundTests.m */; };
232233
C1CC888229BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C1CC888129BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m */; };
233234
E51F642A2CF46899000858D2 /* BranchFileLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = E51F64292CF46899000858D2 /* BranchFileLogger.h */; };
234235
E56394312CC7AC9F00E18E65 /* BranchFileLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = E563942F2CC7AC9500E18E65 /* BranchFileLogger.m */; };
@@ -556,6 +557,7 @@
556557
C15CC9DF2ABCF8C8003CC339 /* BranchActivityItemTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchActivityItemTests.m; sourceTree = "<group>"; };
557558
C1614D55285BC8A00098946B /* LinkPresentation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LinkPresentation.framework; path = System/Library/Frameworks/LinkPresentation.framework; sourceTree = SDKROOT; };
558559
C17DAF7A2AC20C2000B16B1A /* BranchClassTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchClassTests.m; sourceTree = "<group>"; };
560+
AA12345600010000000000A1 /* BranchDisableNextForegroundTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BranchDisableNextForegroundTests.m; sourceTree = "<group>"; };
559561
C1CC888129BAAFC000BDD2B5 /* BNCReferringURLUtilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCReferringURLUtilityTests.m; sourceTree = "<group>"; };
560562
E51F64292CF46899000858D2 /* BranchFileLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchFileLogger.h; sourceTree = "<group>"; };
561563
E563942F2CC7AC9500E18E65 /* BranchFileLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchFileLogger.m; sourceTree = "<group>"; };
@@ -685,6 +687,7 @@
685687
4D1683812098C901008819E3 /* Branch-SDK-Tests-Bridging-Header.h */,
686688
C15CC9DF2ABCF8C8003CC339 /* BranchActivityItemTests.m */,
687689
C17DAF7A2AC20C2000B16B1A /* BranchClassTests.m */,
690+
AA12345600010000000000A1 /* BranchDisableNextForegroundTests.m */,
688691
4D16839C2098C901008819E3 /* BranchEvent.Test.m */,
689692
4D1683952098C901008819E3 /* BranchEvent.Test.swift */,
690693
5F909B712332BEF600A774D2 /* BranchLastAttributedTouchDataTests.m */,
@@ -1498,6 +1501,7 @@
14981501
C15CC9E02ABCF8C8003CC339 /* BranchActivityItemTests.m in Sources */,
14991502
5F92B23423835FEB00CA909B /* BNCReachabilityTests.m in Sources */,
15001503
C17DAF7B2AC20C2000B16B1A /* BranchClassTests.m in Sources */,
1504+
AA12345600010000000000B1 /* BranchDisableNextForegroundTests.m in Sources */,
15011505
C12320B52808DB90007771C0 /* BranchQRCodeTests.m in Sources */,
15021506
5F3D671B233062FD00454FF1 /* BNCJsonLoader.m in Sources */,
15031507
4D1683C02098C902008819E3 /* BranchUniversalObjectTests.m in Sources */,

BranchSDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "BranchSDK"
3-
s.version = "3.13.3"
3+
s.version = "3.14.0"
44
s.summary = "Create an HTTP URL for any piece of content in your app"
55
s.description = <<-DESC
66
- Want the highest possible conversions on your sharing feature?

BranchSDK.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@
20162016
"@executable_path/Frameworks",
20172017
"@loader_path/Frameworks",
20182018
);
2019-
MARKETING_VERSION = 3.13.3;
2019+
MARKETING_VERSION = 3.14.0;
20202020
OTHER_LDFLAGS = (
20212021
"-weak_framework",
20222022
LinkPresentation,
@@ -2051,7 +2051,7 @@
20512051
"@executable_path/Frameworks",
20522052
"@loader_path/Frameworks",
20532053
);
2054-
MARKETING_VERSION = 3.13.3;
2054+
MARKETING_VERSION = 3.14.0;
20552055
OTHER_LDFLAGS = (
20562056
"-weak_framework",
20572057
LinkPresentation,
@@ -2257,7 +2257,7 @@
22572257
"@loader_path/Frameworks",
22582258
);
22592259
MACH_O_TYPE = staticlib;
2260-
MARKETING_VERSION = 3.13.3;
2260+
MARKETING_VERSION = 3.14.0;
22612261
OTHER_LDFLAGS = (
22622262
"-weak_framework",
22632263
LinkPresentation,
@@ -2296,7 +2296,7 @@
22962296
"@loader_path/Frameworks",
22972297
);
22982298
MACH_O_TYPE = staticlib;
2299-
MARKETING_VERSION = 3.13.3;
2299+
MARKETING_VERSION = 3.14.0;
23002300
OTHER_LDFLAGS = (
23012301
"-weak_framework",
23022302
LinkPresentation,
@@ -2333,7 +2333,7 @@
23332333
"@executable_path/Frameworks",
23342334
"@loader_path/Frameworks",
23352335
);
2336-
MARKETING_VERSION = 3.13.3;
2336+
MARKETING_VERSION = 3.14.0;
23372337
OTHER_LDFLAGS = (
23382338
"-weak_framework",
23392339
LinkPresentation,
@@ -2368,7 +2368,7 @@
23682368
"@executable_path/Frameworks",
23692369
"@loader_path/Frameworks",
23702370
);
2371-
MARKETING_VERSION = 3.13.3;
2371+
MARKETING_VERSION = 3.14.0;
23722372
OTHER_LDFLAGS = (
23732373
"-weak_framework",
23742374
LinkPresentation,

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Branch iOS SDK Change Log
22

3+
v.3.14.0
4+
— Added APIs `disableNextForegroundForTimeInterval:`, `disableNextForeground` and `resumeSession` to disable and resume automatic tracking of `OPEN` events. These are experimental APIs. Please refer to warning message in API documentation/comments.
5+
36
v.3.13.3
47
— Fixed Bug - Missing Apple Attribution Token in Install Requests (impacted versions: 3.13.0 - 3.13.2).
58

SDKIntegrationTestApps/PostRelease-iOSReleaseTest-Carthage/iOSReleaseTest.xcodeproj/project.pbxproj

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
E75C0E192975391F0001D5D7 /* BranchSDK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E763E99C29354DA40053F490 /* BranchSDK.xcframework */; };
1818
E75C0E1A2975391F0001D5D7 /* BranchSDK.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E763E99C29354DA40053F490 /* BranchSDK.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1919
E7939C0429749D3C00B90B82 /* iOSReleaseTestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7939C0329749D3C00B90B82 /* iOSReleaseTestTests.swift */; };
20+
E7B81C062EAA091000BD39D6 /* BranchSDKTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B81C052EAA091000BD39D6 /* BranchSDKTest.swift */; };
21+
E7B81C082EAA092700BD39D6 /* TestObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7B81C072EAA092700BD39D6 /* TestObserver.swift */; };
2022
/* End PBXBuildFile section */
2123

2224
/* Begin PBXContainerItemProxy section */
@@ -56,6 +58,8 @@
5658
E763E99C29354DA40053F490 /* BranchSDK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = BranchSDK.xcframework; path = Carthage/Build/BranchSDK.xcframework; sourceTree = "<group>"; };
5759
E7939C0129749D3C00B90B82 /* iOSReleaseTestTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOSReleaseTestTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
5860
E7939C0329749D3C00B90B82 /* iOSReleaseTestTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSReleaseTestTests.swift; sourceTree = "<group>"; };
61+
E7B81C052EAA091000BD39D6 /* BranchSDKTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BranchSDKTest.swift; sourceTree = "<group>"; };
62+
E7B81C072EAA092700BD39D6 /* TestObserver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestObserver.swift; sourceTree = "<group>"; };
5963
/* End PBXFileReference section */
6064

6165
/* Begin PBXFrameworksBuildPhase section */
@@ -99,6 +103,7 @@
99103
C119B01627ADC85C00E8C7BF /* iOSReleaseTest */ = {
100104
isa = PBXGroup;
101105
children = (
106+
E7B81C052EAA091000BD39D6 /* BranchSDKTest.swift */,
102107
C119B02B27ADC8FB00E8C7BF /* iOSReleaseTest.entitlements */,
103108
C119B01727ADC85C00E8C7BF /* AppDelegate.swift */,
104109
C119B01927ADC85C00E8C7BF /* SceneDelegate.swift */,
@@ -108,7 +113,8 @@
108113
C119B02227ADC85E00E8C7BF /* LaunchScreen.storyboard */,
109114
C119B02527ADC85E00E8C7BF /* Info.plist */,
110115
);
111-
path = iOSReleaseTest;
116+
name = iOSReleaseTest;
117+
path = ../Source/iOSReleaseTest;
112118
sourceTree = "<group>";
113119
};
114120
E763E99B29354DA30053F490 /* Frameworks */ = {
@@ -122,9 +128,11 @@
122128
E7939C0229749D3C00B90B82 /* iOSReleaseTestTests */ = {
123129
isa = PBXGroup;
124130
children = (
131+
E7B81C072EAA092700BD39D6 /* TestObserver.swift */,
125132
E7939C0329749D3C00B90B82 /* iOSReleaseTestTests.swift */,
126133
);
127-
path = iOSReleaseTestTests;
134+
name = iOSReleaseTestTests;
135+
path = ../Source/IntegrationTests;
128136
sourceTree = "<group>";
129137
};
130138
/* End PBXGroup section */
@@ -232,6 +240,7 @@
232240
files = (
233241
C119B01C27ADC85C00E8C7BF /* ViewController.swift in Sources */,
234242
C119B01827ADC85C00E8C7BF /* AppDelegate.swift in Sources */,
243+
E7B81C062EAA091000BD39D6 /* BranchSDKTest.swift in Sources */,
235244
C119B01A27ADC85C00E8C7BF /* SceneDelegate.swift in Sources */,
236245
);
237246
runOnlyForDeploymentPostprocessing = 0;
@@ -241,6 +250,7 @@
241250
buildActionMask = 2147483647;
242251
files = (
243252
E7939C0429749D3C00B90B82 /* iOSReleaseTestTests.swift in Sources */,
253+
E7B81C082EAA092700BD39D6 /* TestObserver.swift in Sources */,
244254
);
245255
runOnlyForDeploymentPostprocessing = 0;
246256
};
@@ -395,12 +405,12 @@
395405
buildSettings = {
396406
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
397407
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
398-
CODE_SIGN_ENTITLEMENTS = iOSReleaseTest/iOSReleaseTest.entitlements;
399-
CODE_SIGN_STYLE = Automatic;
408+
CODE_SIGN_ENTITLEMENTS = "$(PROJECT_DIR)/../Source/iOSReleaseTest/iOSReleaseTest.entitlements";
409+
CODE_SIGN_STYLE = Manual;
400410
CURRENT_PROJECT_VERSION = 1;
401-
DEVELOPMENT_TEAM = 5YP4T32B58;
411+
DEVELOPMENT_TEAM = "";
402412
GENERATE_INFOPLIST_FILE = YES;
403-
INFOPLIST_FILE = iOSReleaseTest/Info.plist;
413+
INFOPLIST_FILE = "$(PROJECT_DIR)/../Source/iOSReleaseTest/Info.plist";
404414
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
405415
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
406416
INFOPLIST_KEY_UIMainStoryboardFile = Main;
@@ -411,8 +421,9 @@
411421
"@executable_path/Frameworks",
412422
);
413423
MARKETING_VERSION = 1.0;
414-
PRODUCT_BUNDLE_IDENTIFIER = com.NipunSingh.iOSReleaseTest;
424+
PRODUCT_BUNDLE_IDENTIFIER = "io.branch.link-simulator";
415425
PRODUCT_NAME = "$(TARGET_NAME)";
426+
PROVISIONING_PROFILE_SPECIFIER = "";
416427
SWIFT_EMIT_LOC_STRINGS = YES;
417428
SWIFT_VERSION = 5.0;
418429
TARGETED_DEVICE_FAMILY = "1,2";
@@ -424,12 +435,12 @@
424435
buildSettings = {
425436
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
426437
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
427-
CODE_SIGN_ENTITLEMENTS = iOSReleaseTest/iOSReleaseTest.entitlements;
428-
CODE_SIGN_STYLE = Automatic;
438+
CODE_SIGN_ENTITLEMENTS = "$(PROJECT_DIR)/../Source/iOSReleaseTest/iOSReleaseTest.entitlements";
439+
CODE_SIGN_STYLE = Manual;
429440
CURRENT_PROJECT_VERSION = 1;
430-
DEVELOPMENT_TEAM = YKPTD52Z6X;
441+
DEVELOPMENT_TEAM = "";
431442
GENERATE_INFOPLIST_FILE = YES;
432-
INFOPLIST_FILE = iOSReleaseTest/Info.plist;
443+
INFOPLIST_FILE = "$(PROJECT_DIR)/../Source/iOSReleaseTest/Info.plist";
433444
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
434445
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
435446
INFOPLIST_KEY_UIMainStoryboardFile = Main;
@@ -440,8 +451,9 @@
440451
"@executable_path/Frameworks",
441452
);
442453
MARKETING_VERSION = 1.0;
443-
PRODUCT_BUNDLE_IDENTIFIER = com.NipunSingh.iOSReleaseTest;
454+
PRODUCT_BUNDLE_IDENTIFIER = "io.branch.link-simulator";
444455
PRODUCT_NAME = "$(TARGET_NAME)";
456+
PROVISIONING_PROFILE_SPECIFIER = "";
445457
SWIFT_EMIT_LOC_STRINGS = YES;
446458
SWIFT_VERSION = 5.0;
447459
TARGETED_DEVICE_FAMILY = "1,2";

0 commit comments

Comments
 (0)