Skip to content

Commit 1344c5d

Browse files
committed
Allow macCatalyst for LPLinkMetadata and UIScene. Fix framework build
1 parent 2ff472e commit 1344c5d

File tree

7 files changed

+18
-46
lines changed

7 files changed

+18
-46
lines changed

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, macCatalyst 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/ViewController.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ - (void)viewDidLoad {
7373
[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)];
7474
[self.tableView addGestureRecognizer:gestureRecognizer];
7575

76-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
76+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
7777
activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleMedium];
7878
} else {
7979
activityIndicator = [[UIActivityIndicatorView alloc] init];
@@ -128,24 +128,24 @@ - (void)viewDidLoad {
128128

129129
if ([Branch trackingDisabled]) {
130130
[self.disableTrackingButton setTitle:@"Enable Tracking" forState:UIControlStateNormal];
131-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
131+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
132132
[self.disableTrackingButton setImage:[UIImage systemImageNamed:@"eye.fill"] forState:UIControlStateNormal];
133133
}
134134
} else {
135135
[self.disableTrackingButton setTitle:@"Disable Tracking" forState:UIControlStateNormal];
136-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
136+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
137137
[self.disableTrackingButton setImage:[UIImage systemImageNamed:@"eye.slash.fill"] forState:UIControlStateNormal];
138138
}
139139
}
140140

141141
if (hasSetPartnerParams) {
142142
[self.setParnerParamsButton setTitle:@"Clear Partner Params" forState:UIControlStateNormal];
143-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
143+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
144144
[self.setParnerParamsButton setImage:[UIImage systemImageNamed:@"folder.badge.minus"] forState:UIControlStateNormal];
145145
}
146146
} else {
147147
[self.setParnerParamsButton setTitle:@"Set Partner Params" forState:UIControlStateNormal];
148-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
148+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
149149
[self.setParnerParamsButton setImage:[UIImage systemImageNamed:@"folder.badge.plus"] forState:UIControlStateNormal];
150150
}
151151
}
@@ -388,7 +388,7 @@ - (IBAction)shareLinkButtonTouchUpInside:(id)sender {
388388
@"Shared from Branch-TestBed at %@.",
389389
[self.dateFormatter stringFromDate:[NSDate date]]];
390390

391-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
391+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
392392
LPLinkMetadata *tempLinkMetatData = [[LPLinkMetadata alloc] init];
393393
tempLinkMetatData.title = @"Branch URL";
394394
UIImage *img = [UIImage imageNamed:@"Brand Assets"];
@@ -769,7 +769,7 @@ - (IBAction)togglePartnerParams:(id)sender {
769769
[self showAlert:@"Cleared Partner Parameters" withDescription:@""];
770770
hasSetPartnerParams = false;
771771
[self.setParnerParamsButton setTitle:@"Set Partner Params" forState:UIControlStateNormal];
772-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
772+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
773773
[self.setParnerParamsButton setImage:[UIImage systemImageNamed:@"folder.badge.plus"] forState:UIControlStateNormal];
774774
}
775775
} else {
@@ -779,7 +779,7 @@ - (IBAction)togglePartnerParams:(id)sender {
779779
[self showAlert:@"Set Partner Parameters" withDescription:@""];
780780
hasSetPartnerParams = true;
781781
[self.setParnerParamsButton setTitle:@"Clear Partner Params" forState:UIControlStateNormal];
782-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
782+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
783783
[self.setParnerParamsButton setImage:[UIImage systemImageNamed:@"folder.badge.minus"] forState:UIControlStateNormal];
784784
}
785785
}
@@ -806,13 +806,13 @@ - (IBAction)disableTracking:(id)sender {
806806
if ([title isEqualToString:@"Disable Tracking"]) {
807807
[Branch setTrackingDisabled:YES];
808808
[self.disableTrackingButton setTitle:@"Enable Tracking" forState:UIControlStateNormal];
809-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
809+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
810810
[self.disableTrackingButton setImage:[UIImage systemImageNamed:@"eye.fill"] forState:UIControlStateNormal];
811811
}
812812
} else {
813813
[Branch setTrackingDisabled:NO];
814814
[self.disableTrackingButton setTitle:@"Disable Tracking" forState:UIControlStateNormal];
815-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
815+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
816816
[self.disableTrackingButton setImage:[UIImage systemImageNamed:@"eye.slash.fill"] forState:UIControlStateNormal];
817817
}
818818
}
@@ -863,7 +863,7 @@ - (IBAction)shareLinkWithMetadata:(id)sender {
863863

864864
BranchShareLink *bsl = [[BranchShareLink alloc] initWithUniversalObject:buo linkProperties:lp];
865865

866-
if (@available(iOS 13.0, macCatalyst 13.0, *)) {
866+
if (@available(iOS 13.0, macCatalyst 13.1, *)) {
867867
[bsl addLPLinkMetadata:@"LPLinkMetadata Link" icon:iconImg];
868868
}
869869

0 commit comments

Comments
 (0)