Skip to content

Commit

Permalink
fix(AWSCore): Fixing a name collision with CocoaLumberjack (aws-ampli…
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisebas authored Jun 4, 2024
1 parent 6ef6e9f commit bd6ea31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions AWSCore/Logging/AWSDDFileLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@


#if TARGET_OS_IPHONE
BOOL doesAppRunInBackground(void);
BOOL awsDoesAppRunInBackground(void);
#endif

unsigned long long const kAWSDDDefaultLogMaxFileSize = 1024 * 1024; // 1 MB
Expand Down Expand Up @@ -174,7 +174,7 @@ - (void)setMaximumNumberOfLogFiles:(NSUInteger)maximumNumberOfLogFiles {
- (NSFileProtectionType)logFileProtection {
if (_defaultFileProtectionLevel.length > 0) {
return _defaultFileProtectionLevel;
} else if (doesAppRunInBackground()) {
} else if (awsDoesAppRunInBackground()) {
return NSFileProtectionCompleteUntilFirstUserAuthentication;
} else {
return NSFileProtectionCompleteUnlessOpen;
Expand Down Expand Up @@ -1026,7 +1026,7 @@ - (BOOL)lt_shouldLogFileBeArchived:(AWSDDLogFileInfo *)mostRecentLogFileInfo {
// a new one.
//
// If user has overwritten to NSFileProtectionNone there is no need to create a new one.
if (doesAppRunInBackground()) {
if (awsDoesAppRunInBackground()) {
NSFileProtectionType key = mostRecentLogFileInfo.fileAttributes[NSFileProtectionKey];
__auto_type isUntilFirstAuth = [key isEqualToString:NSFileProtectionCompleteUntilFirstUserAuthentication];
__auto_type isNone = [key isEqualToString:NSFileProtectionNone];
Expand Down Expand Up @@ -1846,7 +1846,7 @@ - (NSComparisonResult)reverseCompareByModificationDate:(AWSDDLogFileInfo *)anoth
* want (even if device is locked). Thats why that attribute have to be changed to
* NSFileProtectionCompleteUntilFirstUserAuthentication.
*/
BOOL doesAppRunInBackground(void) {
BOOL awsDoesAppRunInBackground(void) {
if ([[[NSBundle mainBundle] executablePath] containsString:@".appex/"]) {
return YES;
}
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Unreleased

-Features for next release
- **AWSCore**
- Fixing a name collision with CocoaLumberjack (#5361)

## 2.36.2

Expand Down

0 comments on commit bd6ea31

Please sign in to comment.