Skip to content

fix(AWSCore): Fixing a name collision with CocoaLumberjack #5361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading