Skip to content

Commit 75381d3

Browse files
authored
Merge pull request #1272 from BranchMetrics/SDK-1879-deprecated-code-removal
fix: SDK-1879 deprecated code removal
2 parents 4183ec2 + 731e879 commit 75381d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+148
-801
lines changed

Branch-TestBed/Branch-SDK-Tests/BNCDeviceInfoTests.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ - (void)testScreenScale {
153153
XCTAssert(self.deviceInfo.screenScale.intValue >= 1);
154154
}
155155

156-
- (void)testCarrierName_Simulator {
157-
XCTAssertNil(self.deviceInfo.carrierName);
158-
}
159-
160156
- (void)testLocale {
161157
NSString *locale = [NSLocale currentLocale].localeIdentifier;
162158
XCTAssertNotNil(locale);

Branch-TestBed/Branch-SDK-Tests/BNCLocaleTests.m

Lines changed: 0 additions & 73 deletions
This file was deleted.

Branch-TestBed/Branch-SDK-Tests/BNCPasteboardTests.m

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,53 +31,41 @@ - (void)tearDown {
3131

3232
- (void)addStringToPasteboard {
3333
#if !TARGET_OS_TV
34-
if (@available(iOS 10.0, *)) {
35-
[UIPasteboard.generalPasteboard setString:self.testString];
36-
}
34+
[UIPasteboard.generalPasteboard setString:self.testString];
3735
#endif
3836
}
3937

4038
- (void)addBranchURLToPasteboard {
4139
#if !TARGET_OS_TV
42-
if (@available(iOS 10.0, *)) {
43-
[UIPasteboard.generalPasteboard setURL:self.testBranchURL];
44-
}
40+
[UIPasteboard.generalPasteboard setURL:self.testBranchURL];
4541
#endif
4642
}
4743

4844
- (void)addNonBranchURLToPasteboard {
4945
#if !TARGET_OS_TV
50-
if (@available(iOS 10.0, *)) {
51-
[UIPasteboard.generalPasteboard setURL:[NSURL URLWithString:@"https://www.apple.com"]];
52-
}
46+
[UIPasteboard.generalPasteboard setURL:[NSURL URLWithString:@"https://www.apple.com"]];
5347
#endif
5448
}
5549

5650
- (void)clearPasteboard {
5751
#if !TARGET_OS_TV
58-
if (@available(iOS 10.0, *)) {
59-
// cannot delete items from the pasteboard, but we can put something else on there
60-
[[UIPasteboard generalPasteboard] setString:@""];
61-
}
52+
// cannot delete items from the pasteboard, but we can put something else on there
53+
[[UIPasteboard generalPasteboard] setString:@""];
6254
#endif
6355
}
6456

6557
- (NSString *)getStringFromClipboard {
6658
NSString *string = nil;
6759
#if !TARGET_OS_TV
68-
if (@available(iOS 10.0, *)) {
69-
string = [UIPasteboard.generalPasteboard string];
70-
}
60+
string = [UIPasteboard.generalPasteboard string];
7161
#endif
7262
return string;
7363
}
7464

7565
- (NSURL *)getURLFromPasteboard {
7666
NSURL *url = nil;
7767
#if !TARGET_OS_TV
78-
if (@available(iOS 10.0, *)) {
79-
url = [UIPasteboard.generalPasteboard URL];
80-
}
68+
url = [UIPasteboard.generalPasteboard URL];
8169
#endif
8270
return url;
8371
}
@@ -157,7 +145,7 @@ - (void)testCheckForBranchLink_noLink {
157145
// This test fails intermittently when executed with other tests - depending upon the order in which its executed
158146
- (void) testPassPasteControl {
159147
#if !TARGET_OS_TV
160-
if (@available(iOS 16.0, *)) {
148+
if (@available(iOS 16.0, macCatalyst 16.0, *)) {
161149

162150
long long timeStamp = ([[NSDate date] timeIntervalSince1970] - 5*60)*1000; // 5 minute earlier timestamp
163151
NSString *urlString = [NSString stringWithFormat:@"https://bnctestbed-alternate.app.link/9R7MbTmnRtb?__branch_flow_type=viewapp&__branch_flow_id=1105940563590163783&__branch_mobile_deepview_type=1&nl_opt_in=1&_cpts=%lld", timeStamp];

Branch-TestBed/Branch-SDK-Tests/BNCSKAdNetworkTests.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ - (void)tearDown {
4747

4848
- (void)testDefaultMaxTimeout {
4949
NSTimeInterval days;
50-
if (@available(iOS 16.1, *)) {
50+
if (@available(iOS 16.1, macCatalyst 16.1, *)) {
5151
days = 3600.0 * 24.0 * 60.0; // one day
5252
} else {
5353
days = 3600.0 * 24.0; // one day
@@ -66,7 +66,7 @@ - (void)testShouldAttemptSKAdNetworkCalloutFalse {
6666

6767
- (void)testPostbackCall {
6868

69-
if (@available(iOS 16.1, *)) {
69+
if (@available(iOS 16.1, macCatalyst 16.1, *)) {
7070
self.skAdNetwork.maxTimeSinceInstall = 3600.0 * 24.0 * 60.0;
7171
} else {
7272
self.skAdNetwork.maxTimeSinceInstall = 3600.0 * 24.0; // one day
@@ -94,7 +94,7 @@ - (void)testPostbackCall {
9494

9595
- (void)testSKAN4ParamsDefaultValues {
9696

97-
if (@available(iOS 16.1, *)) {
97+
if (@available(iOS 16.1, macCatalyst 16.1, *)) {
9898
NSString *coarseValue = [[BNCSKAdNetwork sharedInstance] getCoarseConversionValueFromDataResponse:@{}];
9999
XCTAssertTrue([coarseValue isEqualToString:@"low"]);
100100

@@ -108,7 +108,7 @@ - (void)testSKAN4ParamsDefaultValues {
108108

109109
- (void)testSKAN4ParamsValues {
110110

111-
if (@available(iOS 16.1, *)) {
111+
if (@available(iOS 16.1, macCatalyst 16.1, *)) {
112112

113113
NSDictionary *response = @{@"update_conversion_value": @16, @"coarse_key": @"high", @"locked": @YES, @"ascending_only":@NO };
114114
BNCSKAdNetwork *adNetwork = [BNCSKAdNetwork sharedInstance];

Branch-TestBed/Branch-SDK-Tests/BNCTelephonyTests.m

Lines changed: 0 additions & 43 deletions
This file was deleted.

Branch-TestBed/Branch-SDK-Tests/BranchShareLinkTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ - (void)testAddLPLinkMetadata {
2323

2424
BranchShareLink *bsl = [[BranchShareLink alloc] initWithUniversalObject:buo linkProperties:lp];
2525

26-
if (@available(iOS 13.0, *)) {
26+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
2727
NSURL *imageURL = [NSURL URLWithString:@"https://cdn.branch.io/branch-assets/1598575682753-og_image.png"];
2828
NSData *imageData = [NSData dataWithContentsOfURL:imageURL];
2929
UIImage *iconImage = [UIImage imageWithData:imageData];

Branch-TestBed/Branch-TestBed-UITests/UITestSafari.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
//
88

99
#import <XCTest/XCTest.h>
10-
//#import "Branch/NSString+Branch.h"
11-
12-
// Ignore UITests availability for iOS 8 and lower in this example.
13-
#pragma clang diagnostic ignored "-Wpartial-availability"
1410

1511
static NSTimeInterval const kDeepLinkSleepTimeInterval = 10.0;
1612
static NSTimeInterval const kLoadWikiPageTimeInterval = 3.0;

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,7 @@
169169
5F4101F526851DC7003699AD /* BNCPasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F4101F326851DC7003699AD /* BNCPasteboard.h */; };
170170
5F4101F626851DC7003699AD /* BNCPasteboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F4101F426851DC7003699AD /* BNCPasteboard.m */; };
171171
5F42763325DB3694005B9BBC /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F42763225DB3694005B9BBC /* AdServices.framework */; };
172-
5F437E35237DDF770052064B /* BNCTelephony.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F437E33237DDF770052064B /* BNCTelephony.h */; };
173-
5F437E36237DDF770052064B /* BNCTelephony.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F437E34237DDF770052064B /* BNCTelephony.m */; };
174172
5F437E38237DE1320052064B /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F437E37237DE1320052064B /* CoreTelephony.framework */; settings = {ATTRIBUTES = (Required, ); }; };
175-
5F437E3A237DE3480052064B /* BNCTelephonyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F437E39237DE3480052064B /* BNCTelephonyTests.m */; };
176173
5F437E3D237E03C00052064B /* BNCDeviceSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F437E3B237E03C00052064B /* BNCDeviceSystem.h */; };
177174
5F437E3E237E03C00052064B /* BNCDeviceSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F437E3C237E03C00052064B /* BNCDeviceSystem.m */; };
178175
5F437E40237E1A560052064B /* BNCDeviceSystemTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F437E3F237E1A560052064B /* BNCDeviceSystemTests.m */; };
@@ -198,9 +195,6 @@
198195
5F92B23223834AFD00CA909B /* BNCReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F92B23023834AFD00CA909B /* BNCReachability.m */; };
199196
5F92B23423835FEB00CA909B /* BNCReachabilityTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F92B23323835FEB00CA909B /* BNCReachabilityTests.m */; };
200197
5F92B2362383644C00CA909B /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F92B2352383644C00CA909B /* SystemConfiguration.framework */; };
201-
5F92B2392383703700CA909B /* BNCLocale.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F92B2372383703700CA909B /* BNCLocale.h */; };
202-
5F92B23A2383703700CA909B /* BNCLocale.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F92B2382383703700CA909B /* BNCLocale.m */; };
203-
5F92B23C2384744A00CA909B /* BNCLocaleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F92B23B2384744A00CA909B /* BNCLocaleTests.m */; };
204198
5F92B23F238486E200CA909B /* BNCNetworkInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F92B23D238486E200CA909B /* BNCNetworkInterface.h */; };
205199
5F92B240238486E200CA909B /* BNCNetworkInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F92B23E238486E200CA909B /* BNCNetworkInterface.m */; };
206200
5F92B242238752A500CA909B /* BNCDeviceInfoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F92B241238752A500CA909B /* BNCDeviceInfoTests.m */; };
@@ -491,10 +485,7 @@
491485
5F4101F326851DC7003699AD /* BNCPasteboard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCPasteboard.h; sourceTree = "<group>"; };
492486
5F4101F426851DC7003699AD /* BNCPasteboard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCPasteboard.m; sourceTree = "<group>"; };
493487
5F42763225DB3694005B9BBC /* AdServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdServices.framework; path = System/Library/Frameworks/AdServices.framework; sourceTree = SDKROOT; };
494-
5F437E33237DDF770052064B /* BNCTelephony.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCTelephony.h; sourceTree = "<group>"; };
495-
5F437E34237DDF770052064B /* BNCTelephony.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCTelephony.m; sourceTree = "<group>"; };
496488
5F437E37237DE1320052064B /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreTelephony.framework; sourceTree = DEVELOPER_DIR; };
497-
5F437E39237DE3480052064B /* BNCTelephonyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCTelephonyTests.m; sourceTree = "<group>"; };
498489
5F437E3B237E03C00052064B /* BNCDeviceSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCDeviceSystem.h; sourceTree = "<group>"; };
499490
5F437E3C237E03C00052064B /* BNCDeviceSystem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCDeviceSystem.m; sourceTree = "<group>"; };
500491
5F437E3F237E1A560052064B /* BNCDeviceSystemTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCDeviceSystemTests.m; sourceTree = "<group>"; };
@@ -521,9 +512,6 @@
521512
5F92B23023834AFD00CA909B /* BNCReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCReachability.m; sourceTree = "<group>"; };
522513
5F92B23323835FEB00CA909B /* BNCReachabilityTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCReachabilityTests.m; sourceTree = "<group>"; };
523514
5F92B2352383644C00CA909B /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };
524-
5F92B2372383703700CA909B /* BNCLocale.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCLocale.h; sourceTree = "<group>"; };
525-
5F92B2382383703700CA909B /* BNCLocale.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCLocale.m; sourceTree = "<group>"; };
526-
5F92B23B2384744A00CA909B /* BNCLocaleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCLocaleTests.m; sourceTree = "<group>"; };
527515
5F92B23D238486E200CA909B /* BNCNetworkInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BNCNetworkInterface.h; sourceTree = "<group>"; };
528516
5F92B23E238486E200CA909B /* BNCNetworkInterface.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCNetworkInterface.m; sourceTree = "<group>"; };
529517
5F92B241238752A500CA909B /* BNCDeviceInfoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BNCDeviceInfoTests.m; sourceTree = "<group>"; };
@@ -734,7 +722,6 @@
734722
5F73FC8023314697000EBD32 /* BNCJSONUtilityTests.m */,
735723
5F8BB66D278771890055D2DC /* BNCKeyChainTests.m */,
736724
4D1683842098C901008819E3 /* BNCLinkDataTests.m */,
737-
5F92B23B2384744A00CA909B /* BNCLocaleTests.m */,
738725
4D1683902098C901008819E3 /* BNCLog.Test.m */,
739726
5FA9112E29BC662000F3D35C /* BNCNetworkInterfaceTests.m */,
740727
5FDF91582581CDF4009BE5A3 /* BNCPartnerParametersTests.m */,
@@ -747,7 +734,6 @@
747734
5FB6CC12264F0C7C0020E478 /* BNCServerRequestQueueTests.m */,
748735
5FDB04F324E6156800F2F267 /* BNCSKAdNetworkTests.m */,
749736
4D16838F2098C901008819E3 /* BNCSystemObserverTests.m */,
750-
5F437E39237DE3480052064B /* BNCTelephonyTests.m */,
751737
4D1683A12098C901008819E3 /* BNCTestCase.h */,
752738
4D16838D2098C901008819E3 /* BNCTestCase.m */,
753739
4D7881F9209CF2D4002B750F /* BNCTestCase.strings */,
@@ -965,8 +951,6 @@
965951
7E30BCF61A72FE7900AC7402 /* BNCLinkCache.m */,
966952
7E30BCF21A71EEEE00AC7402 /* BNCLinkData.h */,
967953
7E30BCF31A71EEEE00AC7402 /* BNCLinkData.m */,
968-
5F92B2372383703700CA909B /* BNCLocale.h */,
969-
5F92B2382383703700CA909B /* BNCLocale.m */,
970954
4DA577151E67B1D600A43BDD /* BNCLog.h */,
971955
4DA577161E67B1D600A43BDD /* BNCLog.m */,
972956
5F92B23D238486E200CA909B /* BNCNetworkInterface.h */,
@@ -1000,8 +984,6 @@
1000984
F185BAA91F3D30D70056300C /* BNCSpotlightService.m */,
1001985
670016C71946309100A9E103 /* BNCSystemObserver.h */,
1002986
670016C81946309100A9E103 /* BNCSystemObserver.m */,
1003-
5F437E33237DDF770052064B /* BNCTelephony.h */,
1004-
5F437E34237DDF770052064B /* BNCTelephony.m */,
1005987
4D7881F6209CF28E002B750F /* BNCThreads.h */,
1006988
4D7881F5209CF28E002B750F /* BNCThreads.m */,
1007989
5F08460F23480008005B17E6 /* BNCTuneUtility.h */,
@@ -1158,10 +1140,8 @@
11581140
4DCAC80E1F426F7C00405D1D /* BNCSystemObserver.h in Headers */,
11591141
C10C61AD28248E5A00761D7E /* BNCQRCodeCache.h in Headers */,
11601142
5FE693F72405E91500E3AEE2 /* BNCCallbackMap.h in Headers */,
1161-
5F92B2392383703700CA909B /* BNCLocale.h in Headers */,
11621143
5F38021F24DCC2E800E6FAFD /* BNCServerResponse.h in Headers */,
11631144
5F38023024DCC2E800E6FAFD /* BNCServerRequestQueue.h in Headers */,
1164-
5F437E35237DDF770052064B /* BNCTelephony.h in Headers */,
11651145
4DCAC8161F426F7C00405D1D /* BranchCSSearchableItemAttributeSet.h in Headers */,
11661146
4D59B51F2006979C00F89FD5 /* BNCApplication.h in Headers */,
11671147
5FB0AA6B231875B500A0F9EA /* BNCUserAgentCollector.h in Headers */,
@@ -1499,10 +1479,8 @@
14991479
4D9607F51FBF9473008AB3C2 /* UIViewController+Branch.m in Sources */,
15001480
C1CC888929C27E8000BDD2B5 /* BNCUrlQueryParameter.m in Sources */,
15011481
4D35141C1E3201D80085EBA1 /* NSMutableDictionary+Branch.m in Sources */,
1502-
5F92B23A2383703700CA909B /* BNCLocale.m in Sources */,
15031482
4D955CCD2035021400FB8008 /* BNCURLFilter.m in Sources */,
15041483
466B58681B17779C00A69EDE /* BNCLinkData.m in Sources */,
1505-
5F437E36237DDF770052064B /* BNCTelephony.m in Sources */,
15061484
5F892ED8236258390023AEC1 /* BNCFacebookAppLinks.m in Sources */,
15071485
54FF1F921BD1DC320004CE2E /* BranchLinkProperties.m in Sources */,
15081486
466B586A1B17779C00A69EDE /* BNCLinkCache.m in Sources */,
@@ -1570,8 +1548,6 @@
15701548
5F205D0823186AF700C776D1 /* BNCUserAgentCollectorTests.m in Sources */,
15711549
5FCF7EAD29DC96A7008D629E /* BNCURLFilterSkiplistUpgradeTests.m in Sources */,
15721550
4D1683C12098C902008819E3 /* BNCApplication.Test.m in Sources */,
1573-
5F92B23C2384744A00CA909B /* BNCLocaleTests.m in Sources */,
1574-
5F437E3A237DE3480052064B /* BNCTelephonyTests.m in Sources */,
15751551
4D1683B92098C902008819E3 /* BNCSystemObserverTests.m in Sources */,
15761552
4D1683BE2098C902008819E3 /* BranchShortUrlSyncRequestTests.m in Sources */,
15771553
4D1683CA2098C902008819E3 /* BNCPreferenceHelperTests.m in Sources */,

0 commit comments

Comments
 (0)