Skip to content

Commit f2bcbd9

Browse files
Merge develop to master for 5.0.2 (#2475)
1 parent 6425f35 commit f2bcbd9

File tree

21 files changed

+42
-33
lines changed

21 files changed

+42
-33
lines changed

.azure-pipelines/build-frameworks-and-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
scheme: 'All App Center Frameworks'
4343
xcodeVersion: specifyPath
4444
xcodeDeveloperDir: '$(XCODE_PATH)'
45-
args: 'SYMROOT="$(Build.BinariesDirectory)"'
45+
args: 'SYMROOT="$(Build.BinariesDirectory)" GCC_TREAT_WARNINGS_AS_ERRORS=YES SWIFT_TREAT_WARNINGS_AS_ERRORS=YES'
4646
timeoutInMinutes: 50
4747

4848
- task: Xcode@5

AppCenter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.cocoapods_version = '>= 1.10'
33
s.name = 'AppCenter'
4-
s.version = '5.0.1'
4+
s.version = '5.0.2'
55

66
s.summary = 'Visual Studio App Center is your continuous integration, delivery and learning solution for iOS and macOS apps.'
77
s.description = <<-DESC

AppCenter/AppCenter/Internals/Util/MSACUtility+File.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ + (NSURL *)createFileAtPathComponent:(NSString *)filePathComponent
2525
forceOverwrite:(BOOL)forceOverwrite {
2626
@synchronized(self) {
2727
if (filePathComponent) {
28-
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent];
28+
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent isDirectory:NO];
2929

3030
// Check if item already exists. We need to check this as writeToURL:atomically: can override an existing file.
3131
if (!forceOverwrite && [fileURL checkResourceIsReachableAndReturnError:nil]) {
@@ -89,7 +89,7 @@ + (BOOL)deleteFileAtURL:(NSURL *)fileURL {
8989
+ (NSURL *)createDirectoryForPathComponent:(NSString *)directoryPathComponent {
9090
@synchronized(self) {
9191
if (directoryPathComponent) {
92-
NSURL *subDirURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:directoryPathComponent];
92+
NSURL *subDirURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:directoryPathComponent isDirectory:YES];
9393
BOOL success = [self createDirectoryAtURL:subDirURL];
9494
return success ? subDirURL : nil;
9595
}
@@ -100,7 +100,7 @@ + (NSURL *)createDirectoryForPathComponent:(NSString *)directoryPathComponent {
100100
+ (NSData *)loadDataForPathComponent:(NSString *)filePathComponent {
101101
@synchronized(self) {
102102
if (filePathComponent) {
103-
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent];
103+
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent isDirectory:NO];
104104
return [NSData dataWithContentsOfURL:fileURL];
105105
}
106106
return nil;
@@ -133,15 +133,15 @@ + (BOOL)createFileAtPath:(NSString *)filePath contents:(NSData *)data attributes
133133

134134
+ (BOOL)fileExistsForPathComponent:(NSString *)filePathComponent {
135135
{
136-
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent];
136+
NSURL *fileURL = [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent isDirectory:NO];
137137
return [fileURL checkResourceIsReachableAndReturnError:nil];
138138
}
139139
}
140140

141141
+ (NSURL *)fullURLForPathComponent:(NSString *)filePathComponent {
142142
{
143143
if (filePathComponent) {
144-
return [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent];
144+
return [[self appCenterDirectoryURL] URLByAppendingPathComponent:filePathComponent isDirectory:NO];
145145
}
146146
return nil;
147147
}
@@ -168,9 +168,9 @@ + (NSURL *)appCenterDirectoryURL {
168168

169169
// Use the application's bundle identifier for macOS to make sure to use separate directories for each app.
170170
NSString *bundleIdentifier = [NSString stringWithFormat:@"%@/", [MSAC_APP_MAIN_BUNDLE bundleIdentifier]];
171-
dirURL = [[baseDirUrl URLByAppendingPathComponent:bundleIdentifier] URLByAppendingPathComponent:kMSACAppCenterBundleIdentifier];
171+
dirURL = [[baseDirUrl URLByAppendingPathComponent:bundleIdentifier isDirectory:YES] URLByAppendingPathComponent:kMSACAppCenterBundleIdentifier isDirectory:YES];
172172
#else
173-
dirURL = [baseDirUrl URLByAppendingPathComponent:kMSACAppCenterBundleIdentifier];
173+
dirURL = [baseDirUrl URLByAppendingPathComponent:kMSACAppCenterBundleIdentifier isDirectory:YES];
174174
#endif
175175
[self createDirectoryAtURL:dirURL];
176176
});

AppCenter/AppCenter/MSACAppCenter.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ + (BOOL)isDebuggerAttached {
221221
name[3] = getpid();
222222

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

AppCenter/AppCenter/MSACLogger.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ @implementation MSACLogger
88
static MSACLogLevel _currentLogLevel = MSACLogLevelAssert;
99
static MSACLogHandler currentLogHandler;
1010
static BOOL _isUserDefinedLogLevel = NO;
11+
static dispatch_queue_t loggerDispatchQueue;
1112

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

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

4951
+ (MSACLogLevel)currentLogLevel {
@@ -78,12 +80,11 @@ + (void)logMessage:(MSACLogMessageProvider)messageProvider
7880
file:(const char *)file
7981
function:(const char *)function
8082
line:(uint)line {
81-
82-
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
83-
if (currentLogHandler) {
84-
currentLogHandler(messageProvider, loglevel, tag, file, function, line);
85-
}
83+
if (currentLogHandler) {
84+
dispatch_async(loggerDispatchQueue, ^{
85+
currentLogHandler(messageProvider, loglevel, tag, file, function, line);
8686
});
87+
}
8788
}
8889

8990
+ (BOOL)isUserDefinedLogLevel {

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# App Center SDK for iOS, macOS and tvOS Change Log
22

3+
## Version 5.0.2
4+
5+
### App Center
6+
7+
* **[Fix]** Fix NSLog congestion on Apple's Framework Thread.
8+
* **[Improvement]** Always specify `isDirectory` parameter for `[NSURL URLByAppendingPathComponent:]` for better performace.
9+
* **[Improvement]** Disable treating warnings as errors in code to avoid blockers when new Xcode warnings are introduced.
10+
11+
___
12+
313
## Version 5.0.1
414

515
### App Center

CONTRIBUTING.md

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

2829
### Code formatting
2930

Config/Global.xcconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,6 @@ CLANG_ANALYZER_NONNULL = YES
149149
CLANG_ANALYZER_GCD_PERFORMANCE = YES
150150
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES
151151

152-
// Enable warnings-are-errors for all modes. Don't do this just yet.
153-
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES
154-
GCC_TREAT_WARNINGS_AS_ERRORS = YES
155-
156152
// Swift Compiler - Code Generation
157153
SWIFT_ENFORCE_EXCLUSIVE_ACCESS = on
158154

Config/Version.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
BUILD_NUMBER = 1
2-
VERSION_STRING = 5.0.1
2+
VERSION_STRING = 5.0.2

Documentation/iOS/AppCenter/.jazzy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sdk: iphonesimulator
55
theme: ../../Themes/apple
66

77
module: AppCenter
8-
module_version: 5.0.1
8+
module_version: 5.0.2
99
author: Microsoft Corp
1010
author_url: http://www.microsoft.com
1111

0 commit comments

Comments
 (0)