Skip to content

Commit c2057d6

Browse files
author
Edward Smith
committed
Fixed types on log. Updated podspec finally.
1 parent b74d380 commit c2057d6

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

Branch-SDK/Branch-SDK/BNCLog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ extern BNCLogFlushFunctionPtr _Nullable BNCLogFlushFunction(void);
131131
extern void BNCLogWriteMessageFormat(
132132
BNCLogLevel logLevel,
133133
const char *_Nullable sourceFileName,
134-
int sourceLineNumber,
134+
int32_t sourceLineNumber,
135135
id _Nullable messageFormat,
136136
...
137137
);
@@ -140,7 +140,7 @@ extern void BNCLogWriteMessageFormat(
140140
extern void BNCLogWriteMessage(
141141
BNCLogLevel logLevel,
142142
NSString *_Nonnull sourceFileName,
143-
NSUInteger sourceLineNumber,
143+
int32_t sourceLineNumber,
144144
NSString *_Nonnull message
145145
);
146146

Branch-SDK/Branch-SDK/BNCLog.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ void BNCLogSetFlushFunction(BNCLogFlushFunctionPtr flushFunction) {
593593
void BNCLogWriteMessageFormat(
594594
BNCLogLevel logLevel,
595595
const char *_Nullable file,
596-
int lineNumber,
596+
int32_t lineNumber,
597597
NSString *_Nullable message,
598598
...
599599
) {
@@ -642,10 +642,10 @@ void BNCLogWriteMessageFormat(
642642
void BNCLogWriteMessage(
643643
BNCLogLevel logLevel,
644644
NSString *_Nonnull file,
645-
NSUInteger lineNumber,
645+
int32_t lineNumber,
646646
NSString *_Nonnull message
647647
) {
648-
BNCLogWriteMessageFormat(logLevel, file.UTF8String, (int)lineNumber, @"%@", message);
648+
BNCLogWriteMessageFormat(logLevel, file.UTF8String, lineNumber, @"%@", message);
649649
}
650650

651651
void BNCLogFlushMessages() {

Branch-TestBed/Branch-TestBed-UITests/UITestBed/TBBranchViewController.m

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ - (void)viewDidLoad {
137137
UILabel *versionLabel = [[UILabel alloc] initWithFrame:CGRectZero];
138138
versionLabel.textAlignment = NSTextAlignmentCenter;
139139
versionLabel.text =
140-
[NSString stringWithFormat:@"iOS %@\nTestBed %@ SDK %@",
140+
[NSString stringWithFormat:@"iOS %@\nTestBed %@ SDK %@\n%@",
141141
[UIDevice currentDevice].systemVersion,
142142
[NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"],
143-
BNC_SDK_VERSION];
143+
BNC_SDK_VERSION,
144+
BNC_API_BASE_URL];
144145
versionLabel.numberOfLines = 0;
145146
versionLabel.backgroundColor = self.tableView.backgroundColor;
146147
versionLabel.textColor = [UIColor darkGrayColor];
@@ -233,25 +234,31 @@ - (void) showAlertWithTitle:(NSString*)title message:(NSString*)message {
233234

234235
#pragma mark - Actions
235236

237+
static NSString* global_createdBranchURLString = nil;
238+
236239
- (IBAction)createBranchLink:(TBTableRow*)sender {
237240
BranchLinkProperties *linkProperties = [[BranchLinkProperties alloc] init];
238241
linkProperties.feature = feature;
239242
linkProperties.channel = channel;
240243
linkProperties.campaign = @"some campaign";
241244
[linkProperties addControlParam:@"$desktop_url" withValue: desktop_url];
242245
[linkProperties addControlParam:@"$ios_url" withValue: ios_url];
243-
244246
[self.universalObject
245247
getShortUrlWithLinkProperties:linkProperties
246248
andCallback:^(NSString *url, NSError *error) {
247249
sender.value = url;
250+
global_createdBranchURLString = url;
248251
[self.tableView reloadData];
249252
}];
250253
}
251254

252255
- (IBAction) openBranchLinkInApp:(id)sender {
253-
NSURL *URL = [NSURL URLWithString:@"https://branch-uitestbed.app.link/TmAw9WrvPI"]; // <= Your URL goes here.
254-
[[Branch getInstance] handleDeepLinkWithNewSession:URL];
256+
if (global_createdBranchURLString.length) {
257+
NSURL *URL = [NSURL URLWithString:global_createdBranchURLString];
258+
[[Branch getInstance] handleDeepLinkWithNewSession:URL];
259+
} else {
260+
[self showAlertWithTitle:@"Can't Open URL" message:@"No URL to open!\nCreate a link first."];
261+
}
255262
}
256263

257264
- (IBAction)showFirstReferringParams:(TBTableRow*)sender {

Branch.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Use the Branch SDK (branch.io) to create and power the links that point back to
1616
s.license = 'Proprietary'
1717
s.author = { "Branch" => "[email protected]" }
1818
s.source = { git: "https://github.com/BranchMetrics/iOS-Deferred-Deep-Linking-SDK.git", tag: s.version.to_s }
19-
s.platform = :ios, '7.0'
19+
s.platform = :ios, '8.0'
2020
s.requires_arc = true
2121

2222
source_files =

0 commit comments

Comments
 (0)