From f432e4773da6df69cf317b52bdc8d96c0b65935a Mon Sep 17 00:00:00 2001 From: nsingh-branch Date: Thu, 7 Nov 2024 15:49:52 -0800 Subject: [PATCH] Small updates --- .github/workflows/automation-trigger-test.yml | 1 - Branch-TestBed/Branch-TestBed/AppDelegate.m | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/automation-trigger-test.yml b/.github/workflows/automation-trigger-test.yml index ef927ea21..43eb7e22b 100644 --- a/.github/workflows/automation-trigger-test.yml +++ b/.github/workflows/automation-trigger-test.yml @@ -69,7 +69,6 @@ jobs: uses: actions/checkout@v4 with: repository: BranchMetrics/qentelli-saas-sdk-testing-automation - ref: SDK-2465 token: ${{ secrets.BRANCHLET_ACCESS_TOKEN_PUBLIC }} - name: Set up JDK 11 uses: actions/setup-java@v4 diff --git a/Branch-TestBed/Branch-TestBed/AppDelegate.m b/Branch-TestBed/Branch-TestBed/AppDelegate.m index 5166790a6..aedf3557b 100644 --- a/Branch-TestBed/Branch-TestBed/AppDelegate.m +++ b/Branch-TestBed/Branch-TestBed/AppDelegate.m @@ -46,7 +46,6 @@ - (BOOL)application:(UIApplication *)application // Handle the log message and error here. For example, printing to the console: if (error) { NSLog(@"[BranchLog] Level: %lu, Message: %@, Error: %@", (unsigned long)logLevel, message, error.localizedDescription); - //Add to file here } else { NSLog(@"[BranchLog] Level: %lu, Message: %@", (unsigned long)logLevel, message); } @@ -243,7 +242,7 @@ void APPLogHookFunction(NSDate*_Nonnull timestamp, BranchLogLevel level, NSStrin [appDelegate processLogMessage:formattedMessage]; } -// Writes message to log File. +// Writes message to Log File. - (void) processLogMessage:(NSString *)message { if (!self.logFileName) @@ -255,13 +254,12 @@ - (void) processLogMessage:(NSString *)message { [fileHandle seekToEndOfFile]; [fileHandle writeData:[message dataUsingEncoding:NSUTF8StringEncoding]]; [fileHandle closeFile]; - } else { // Create file if it doesnt exist + } else { [message writeToFile:self.logFileName atomically:NO encoding:NSStringEncodingConversionAllowLossy error:nil]; } - NSLog(@"%@", message); // Log messages to console - remove if required. } }