Skip to content

Commit

Permalink
fix: PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sharath-branch committed Nov 25, 2024
1 parent 6bbd3ba commit f9af58b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion BranchSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,6 @@
5FCDD3982B7AC6A100EAF29F /* Public */ = {
isa = PBXGroup;
children = (
E52E5B052CC79E4E00F553EE /* BranchFileLogger.h */,
5FCDD3A42B7AC6A100EAF29F /* BNCCallbacks.h */,
5FCDD3A02B7AC6A100EAF29F /* BNCCurrency.h */,
5FCDD3A72B7AC6A100EAF29F /* BNCInitSessionResponse.h */,
Expand Down Expand Up @@ -978,6 +977,7 @@
5FCDD3CC2B7AC6A100EAF29F /* NSError+Branch.h */,
5FCDD3C82B7AC6A100EAF29F /* NSMutableDictionary+Branch.h */,
5FCDD3D12B7AC6A100EAF29F /* NSString+Branch.h */,
E52E5B052CC79E4E00F553EE /* BranchFileLogger.h */,
5FCDD3BB2B7AC6A100EAF29F /* UIViewController+Branch.h */,
);
path = Private;
Expand Down
2 changes: 0 additions & 2 deletions Sources/BranchSDK/BNCSystemObserver.m
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ + (BOOL)compareUriSchemes : (NSString *) serverUriScheme {
if ([uriScheme isEqualToString:serverUriSchemeWithoutSuffix]) {
return true; }
}
// If no Uri schemes match the one set on the dashboard
return false;
}
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/BranchSDK/Branch+Validator.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef NS_ENUM(NSUInteger, BranchValidationError) {
case BranchLinkDomainError:
return @"Check the link domain and alternate domain values in your info.plist file under the key 'branch_universal_link_domains'. The values should match with the ones on the Branch dashboard.\n\n";
case BranchURISchemeError:
return @"The URI scheme in your info.plist file shoudl match with the URI scheme value for iOS on the Branch dashboard.\n\n";
return @"The URI scheme in your info.plist file should match with the URI scheme value for iOS on the Branch dashboard.\n\n";
case BranchAppIDError:
return @"Check your bundle ID and Apple App Prefix from the Apple Developer website and ensure it matches with the values you have added on the Branch dashboard.\n\n";
case BranchATTError:
Expand Down Expand Up @@ -132,8 +132,8 @@ - (void) validateIntegrationWithServerResponse:(BNCServerResponse*)response {
NSLog(@"-------------------------------------------------");

NSLog(@"------ Checking for URI scheme correctness ------");
NSString *uriScheme = [BNCSystemObserver compareUriSchemes:serverUriScheme] ? passString : errorString;
bool doUriSchemesMatch = [BNCSystemObserver compareUriSchemes:serverUriScheme];
NSString *uriScheme = doUriSchemesMatch ? passString : errorString;
NSLog(@"-------------------------------------------------");

NSLog(@"-- Checking for bundle identifier correctness ---");
Expand Down
12 changes: 4 additions & 8 deletions Sources/BranchSDK/BranchFileLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,31 +70,27 @@ - (void)clearLogs {
}

- (BOOL)isLogFilePopulated {
NSString *logFilePath = [self getLogFilePath];

// Check if the file exists
if (![[NSFileManager defaultManager] fileExistsAtPath:logFilePath]) {
if (![[NSFileManager defaultManager] fileExistsAtPath:self.logFilePath]) {
return NO;
}

// Check if the file is non-empty
NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:logFilePath error:nil];
NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:self.logFilePath error:nil];
unsigned long long fileSize = [attributes fileSize];

return fileSize > 0; // Return YES if file is populated, NO otherwise
}

- (void)shareLogFileFromViewController:(UIViewController *)viewController {
NSString *logFilePath = [self getLogFilePath];

// Check if the log file exists
if (![[NSFileManager defaultManager] fileExistsAtPath:logFilePath]) {
if (![[NSFileManager defaultManager] fileExistsAtPath:self.logFilePath]) {
NSLog(@"No log file found to share.");
return;
}

// Create a URL from the log file path
NSURL *logFileURL = [NSURL fileURLWithPath:logFilePath];
NSURL *logFileURL = [NSURL fileURLWithPath:self.logFilePath];

// Create an activity view controller with the log file
UIActivityViewController *activityVC =
Expand Down
File renamed without changes.

0 comments on commit f9af58b

Please sign in to comment.