Skip to content

Commit

Permalink
Merge develop to master for 5.0.2 (#2475)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyPristensky committed Mar 9, 2023
1 parent 6425f35 commit f2bcbd9
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/build-frameworks-and-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
scheme: 'All App Center Frameworks'
xcodeVersion: specifyPath
xcodeDeveloperDir: '$(XCODE_PATH)'
args: 'SYMROOT="$(Build.BinariesDirectory)"'
args: 'SYMROOT="$(Build.BinariesDirectory)" GCC_TREAT_WARNINGS_AS_ERRORS=YES SWIFT_TREAT_WARNINGS_AS_ERRORS=YES'
timeoutInMinutes: 50

- task: Xcode@5
Expand Down
2 changes: 1 addition & 1 deletion AppCenter.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.cocoapods_version = '>= 1.10'
s.name = 'AppCenter'
s.version = '5.0.1'
s.version = '5.0.2'

s.summary = 'Visual Studio App Center is your continuous integration, delivery and learning solution for iOS and macOS apps.'
s.description = <<-DESC
Expand Down
14 changes: 7 additions & 7 deletions AppCenter/AppCenter/Internals/Util/MSACUtility+File.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ + (NSURL *)createFileAtPathComponent:(NSString *)filePathComponent
forceOverwrite:(BOOL)forceOverwrite {
@synchronized(self) {
if (filePathComponent) {
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent];
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent isDirectory:NO];

// Check if item already exists. We need to check this as writeToURL:atomically: can override an existing file.
if (!forceOverwrite && [fileURL checkResourceIsReachableAndReturnError:nil]) {
Expand Down Expand Up @@ -89,7 +89,7 @@ + (BOOL)deleteFileAtURL:(NSURL *)fileURL {
+ (NSURL *)createDirectoryForPathComponent:(NSString *)directoryPathComponent {
@synchronized(self) {
if (directoryPathComponent) {
NSURL *subDirURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:directoryPathComponent];
NSURL *subDirURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:directoryPathComponent isDirectory:YES];
BOOL success = [self createDirectoryAtURL:subDirURL];
return success ? subDirURL : nil;
}
Expand All @@ -100,7 +100,7 @@ + (NSURL *)createDirectoryForPathComponent:(NSString *)directoryPathComponent {
+ (NSData *)loadDataForPathComponent:(NSString *)filePathComponent {
@synchronized(self) {
if (filePathComponent) {
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent];
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent isDirectory:NO];
return [NSData dataWithContentsOfURL:fileURL];
}
return nil;
Expand Down Expand Up @@ -133,15 +133,15 @@ + (BOOL)createFileAtPath:(NSString *)filePath contents:(NSData *)data attributes

+ (BOOL)fileExistsForPathComponent:(NSString *)filePathComponent {
{
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent];
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent isDirectory:NO];
return [fileURL checkResourceIsReachableAndReturnError:nil];
}
}

+ (NSURL *)fullURLForPathComponent:(NSString *)filePathComponent {
{
if (filePathComponent) {
return [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent];
return [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent isDirectory:NO];
}
return nil;
}
Expand All @@ -168,9 +168,9 @@ + (NSURL *)appCenterDirectoryURL {

// Use the application's bundle identifier for macOS to make sure to use separate directories for each app.
NSString *bundleIdentifier = [NSString stringWithFormat:@"%@/", [MSAC_APP_MAIN_BUNDLE bundleIdentifier]];
dirURL = [[baseDirUrl URLByAppendingPathComponent:bundleIdentifier] URLByAppendingPathComponent:kMSACAppCenterBundleIdentifier];
dirURL = [[baseDirUrl URLByAppendingPathComponent:bundleIdentifier isDirectory:YES] URLByAppendingPathComponent:kMSACAppCenterBundleIdentifier isDirectory:YES];
#else
dirURL = [baseDirUrl URLByAppendingPathComponent:kMSACAppCenterBundleIdentifier];
dirURL = [baseDirUrl URLByAppendingPathComponent:kMSACAppCenterBundleIdentifier isDirectory:YES];
#endif
[self createDirectoryAtURL:dirURL];
});
Expand Down
4 changes: 2 additions & 2 deletions AppCenter/AppCenter/MSACAppCenter.m
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ + (BOOL)isDebuggerAttached {
name[3] = getpid();

if (sysctl(name, 4, &info, &info_size, NULL, 0) == -1) {
NSLog(@"[MSACCrashes] ERROR: Checking for a running debugger via sysctl() "
@"failed.");
MSACLogError([MSACAppCenter logTag], @"[MSACCrashes] ERROR: Checking for a running debugger via sysctl() "
@"failed.");
debuggerIsAttached = false;
}

Expand Down
11 changes: 6 additions & 5 deletions AppCenter/AppCenter/MSACLogger.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ @implementation MSACLogger
static MSACLogLevel _currentLogLevel = MSACLogLevelAssert;
static MSACLogHandler currentLogHandler;
static BOOL _isUserDefinedLogLevel = NO;
static dispatch_queue_t loggerDispatchQueue;

MSACLogHandler const msDefaultLogHandler = ^(MSACLogMessageProvider messageProvider, MSACLogLevel logLevel, NSString *tag,
__attribute__((unused)) const char *file, const char *function, uint line) {
Expand Down Expand Up @@ -44,6 +45,7 @@ @implementation MSACLogger

+ (void)initialize {
currentLogHandler = msDefaultLogHandler;
loggerDispatchQueue = dispatch_queue_create("com.microsoft.appcenter.loggerQueue", DISPATCH_QUEUE_SERIAL);
}

+ (MSACLogLevel)currentLogLevel {
Expand Down Expand Up @@ -78,12 +80,11 @@ + (void)logMessage:(MSACLogMessageProvider)messageProvider
file:(const char *)file
function:(const char *)function
line:(uint)line {

dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
if (currentLogHandler) {
currentLogHandler(messageProvider, loglevel, tag, file, function, line);
}
if (currentLogHandler) {
dispatch_async(loggerDispatchQueue, ^{
currentLogHandler(messageProvider, loglevel, tag, file, function, line);
});
}
}

+ (BOOL)isUserDefinedLogLevel {
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# App Center SDK for iOS, macOS and tvOS Change Log

## Version 5.0.2

### App Center

* **[Fix]** Fix NSLog congestion on Apple's Framework Thread.
* **[Improvement]** Always specify `isDirectory` parameter for `[NSURL URLByAppendingPathComponent:]` for better performace.
* **[Improvement]** Disable treating warnings as errors in code to avoid blockers when new Xcode warnings are introduced.

___

## Version 5.0.1

### App Center
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Please make sure the following is done when submitting a pull request:
1. Make sure all tests have passed and your code is covered.
1. If your change includes a fix or feature related to the changelog of the next release, you have to update the **CHANGELOG.md**.
1. After creating a pull request, sign the CLA, if you haven't already.
1. Make sure that the git history is clean, either by using squash merge of a PR or by doing amend commits during development.

### Code formatting

Expand Down
4 changes: 0 additions & 4 deletions Config/Global.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_GCD_PERFORMANCE = YES
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES

// Enable warnings-are-errors for all modes. Don't do this just yet.
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES

// Swift Compiler - Code Generation
SWIFT_ENFORCE_EXCLUSIVE_ACCESS = on

Expand Down
2 changes: 1 addition & 1 deletion Config/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BUILD_NUMBER = 1
VERSION_STRING = 5.0.1
VERSION_STRING = 5.0.2
2 changes: 1 addition & 1 deletion Documentation/iOS/AppCenter/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../../Themes/apple

module: AppCenter
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/iOS/AppCenterAnalytics/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../../Themes/apple

module: AppCenterAnalytics
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/iOS/AppCenterCrashes/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../../Themes/apple

module: AppCenterCrashes
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/iOS/AppCenterDistribute/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../../Themes/apple

module: AppCenterDistribute
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/macOS/AppCenter/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: macosx
theme: ../../Themes/apple

module: AppCenter
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/macOS/AppCenterAnalytics/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: macosx
theme: ../../Themes/apple

module: AppCenterAnalytics
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/macOS/AppCenterCrashes/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: macosx
theme: ../../Themes/apple

module: AppCenterCrashes
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/tvOS/AppCenter/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: appletvsimulator
theme: ../../Themes/apple

module: AppCenter
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/tvOS/AppCenterAnalytics/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: appletvsimulator
theme: ../../Themes/apple

module: AppCenterAnalytics
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
2 changes: 1 addition & 1 deletion Documentation/tvOS/AppCenterCrashes/.jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sdk: appletvsimulator
theme: ../../Themes/apple

module: AppCenterCrashes
module_version: 5.0.1
module_version: 5.0.2
author: Microsoft Corp
author_url: http://www.microsoft.com

Expand Down
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ let package = Package(
platforms: [
.iOS(.v11),
.macOS(.v10_13),
.macOS(.v10_13),
.tvOS(.v11)
],
products: [
Expand All @@ -75,7 +76,7 @@ let package = Package(
exclude: ["Support"],
cSettings: {
var settings: [CSetting] = [
.define("APP_CENTER_C_VERSION", to:"\"5.0.1\""),
.define("APP_CENTER_C_VERSION", to:"\"5.0.2\""),
.define("APP_CENTER_C_BUILD", to: "\"1\"")
]
settings.append(contentsOf: cHeaderSearchPaths)
Expand Down
2 changes: 1 addition & 1 deletion Package@swift-5.3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let package = Package(
exclude: ["Support"],
cSettings: {
var settings: [CSetting] = [
.define("APP_CENTER_C_VERSION", to:"\"5.0.1\""),
.define("APP_CENTER_C_VERSION", to:"\"5.0.2\""),
.define("APP_CENTER_C_BUILD", to: "\"1\"")
]
settings.append(contentsOf: cHeaderSearchPaths)
Expand Down

0 comments on commit f2bcbd9

Please sign in to comment.