Skip to content

Commit

Permalink
Merge pull request #2379 from microsoft/develop
Browse files Browse the repository at this point in the history
Merge develop to master for release 4.4.0
  • Loading branch information
AnatolyPristensky authored Dec 10, 2021
2 parents 25f6422 + 7f175a2 commit 16d6ed7
Show file tree
Hide file tree
Showing 115 changed files with 1,640 additions and 2,163 deletions.
3 changes: 2 additions & 1 deletion AppCenter.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Pod::Spec.new do |s|
s.cocoapods_version = '>= 1.10'
s.name = 'AppCenter'
s.version = '4.3.0'
s.version = '4.4.0'

s.summary = 'Visual Studio App Center is your continuous integration, delivery and learning solution for iOS and macOS apps.'
s.description = <<-DESC
Expand Down
64 changes: 0 additions & 64 deletions AppCenter/AppCenter.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions AppCenter/AppCenter/AppCenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#import <AppCenter/MSACChannelProtocol.h>
#import <AppCenter/MSACConstants+Flags.h>
#import <AppCenter/MSACConstants.h>
#import <AppCenter/MSACCustomProperties.h>
#import <AppCenter/MSACDevice.h>
#import <AppCenter/MSACEnable.h>
#import <AppCenter/MSACLog.h>
Expand All @@ -30,7 +29,6 @@
#import "MSACChannelProtocol.h"
#import "MSACConstants+Flags.h"
#import "MSACConstants.h"
#import "MSACCustomProperties.h"
#import "MSACDevice.h"
#import "MSACEnable.h"
#import "MSACLog.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ - (instancetype)initWithIngestion:(nullable id<MSACIngestionProtocol>)ingestion
_storage = storage;
_configuration = configuration;
_logsDispatchQueue = logsDispatchQueue;
_itemsCount = [_storage countLogs];
}
return self;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ - (MSACDevice *)device {
- (MSACDevice *)updatedDevice {
@synchronized(self) {
MSACDevice *newDevice = [MSACDevice new];
#if TARGET_OS_IOS
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
CTTelephonyNetworkInfo *telephonyNetworkInfo = [CTTelephonyNetworkInfo new];
CTCarrier *carrier;

Expand Down Expand Up @@ -198,7 +198,7 @@ - (MSACDevice *)updatedDevice {
newDevice.timeZoneOffset = [self timeZoneOffset:[NSTimeZone localTimeZone]];
newDevice.screenSize = [self screenSize];
newDevice.appVersion = [self appVersion:MSAC_APP_MAIN_BUNDLE];
#if TARGET_OS_IOS
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
newDevice.carrierCountry = [self carrierCountry:carrier] ?: overriddenCountryCode;
newDevice.carrierName = [self carrierName:carrier];
#else
Expand Down Expand Up @@ -414,7 +414,7 @@ - (NSString *)screenSize {
#endif
}

#if TARGET_OS_IOS
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
- (NSString *)carrierName:(CTCarrier *)carrier {
return [self isValidCarrierName:carrier.carrierName] ? carrier.carrierName : nil;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef MSAC_DEVICE_TRACKER_PRIVATE_H
#define MSAC_DEVICE_TRACKER_PRIVATE_H

#if TARGET_OS_IOS
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
#import <CoreTelephony/CTCarrier.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#endif
Expand Down Expand Up @@ -114,7 +114,7 @@ static NSString *const kMSACPastDevicesKey = @"PastDevices";
*/
- (NSString *)screenSize;

#if TARGET_OS_IOS
#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
/**
* Get the network carrier name.
*
Expand Down
8 changes: 5 additions & 3 deletions AppCenter/AppCenter/Internals/HttpClient/MSACHttpCall.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@

@implementation MSACHttpCall

#pragma clang diagnostic push
#if __has_warning("-Wcompletion-handler")
#pragma clang diagnostic ignored "-Wcompletion-handler"
#endif
- (instancetype)initWithUrl:(NSURL *)url
method:(NSString *)method
headers:(NSDictionary<NSString *, NSString *> *)headers
data:(NSData *)data
retryIntervals:(NSArray *)retryIntervals
compressionEnabled:(BOOL)compressionEnabled
completionHandler:(MSACHttpRequestCompletionHandler)completionHandler
#if defined(__IPHONE_15_0)
NS_SWIFT_DISABLE_ASYNC
#endif
{
if ((self = [super init])) {
_url = url;
Expand All @@ -43,6 +44,7 @@ - (instancetype)initWithUrl:(NSURL *)url
}
return self;
}
#pragma clang diagnostic pop

- (BOOL)hasReachedMaxRetries {
@synchronized(self) {
Expand Down
2 changes: 0 additions & 2 deletions AppCenter/AppCenter/Internals/HttpClient/MSACHttpClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#import "MSACHttpUtil.h"
#import "MSAC_Reachability.h"

#define DEFAULT_RETRY_INTERVALS @[ @10, @(5 * 60), @(20 * 60) ]

@implementation MSACHttpClient

@synthesize delegate = _delegate;
Expand Down
2 changes: 2 additions & 0 deletions AppCenter/AppCenter/Internals/HttpClient/Util/MSACHttpUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#import <Foundation/Foundation.h>

#define DEFAULT_RETRY_INTERVALS @[ @10, @(5 * 60), @(20 * 60) ]

static short const kMSACMaxCharactersDisplayedForAppSecret = 8;
static NSString *const kMSACHidingStringForAppSecret = @"*";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ - (BOOL)isReadyToSend {
return self.appSecret != nil;
}

- (void)sendAsync:(NSObject *)data completionHandler:(MSACSendAsyncCompletionHandler)handler
#if defined(__IPHONE_15_0)
NS_SWIFT_DISABLE_ASYNC
#pragma clang diagnostic push
#if __has_warning("-Wcompletion-handler")
#pragma clang diagnostic ignored "-Wcompletion-handler"
#endif
- (void)sendAsync:(NSObject *)data completionHandler:(MSACSendAsyncCompletionHandler)handler
{
MSACLogContainer *container = (MSACLogContainer *)data;
NSString *batchId = container.batchId;
Expand Down Expand Up @@ -62,6 +63,7 @@ - (void)sendAsync:(NSObject *)data completionHandler:(MSACSendAsyncCompletionHan
handler(batchId, response, responseBody, error);
}];
}
#pragma clang diagnostic pop

- (NSDictionary *)getHeadersWithData:(nullable NSObject *__unused)data eTag:(nullable NSString *__unused)eTag {
NSMutableDictionary *httpHeaders = [self.httpHeaders mutableCopy];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ - (id)initWithHttpClient:(id<MSACHttpClientProtocol>)httpClient
apiPath:apiPath
headers:headers
queryStrings:queryStrings
retryIntervals:@[ @(10), @(5 * 60), @(20 * 60) ]];
retryIntervals:DEFAULT_RETRY_INTERVALS];
}

- (id)initWithHttpClient:(id<MSACHttpClientProtocol>)httpClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ - (id)initWithHttpClient:(id<MSACHttpClientProtocol>)httpClient baseUrl:(NSStrin
[NSString stringWithFormat:kMSACOneCollectorClientVersionFormat, [MSACUtility sdkVersion]]
}
queryStrings:nil
retryIntervals:@[ @(10), @(5 * 60), @(20 * 60) ]
retryIntervals:DEFAULT_RETRY_INTERVALS
maxNumberOfConnections:2];
return self;
}
Expand Down
23 changes: 0 additions & 23 deletions AppCenter/AppCenter/Internals/MSACCustomPropertiesInternal.h

This file was deleted.

13 changes: 0 additions & 13 deletions AppCenter/AppCenter/Internals/MSACCustomPropertiesPrivate.h

This file was deleted.

15 changes: 0 additions & 15 deletions AppCenter/AppCenter/Internals/Model/MSACCustomPropertiesLog.h

This file was deleted.

113 changes: 0 additions & 113 deletions AppCenter/AppCenter/Internals/Model/MSACCustomPropertiesLog.m

This file was deleted.

7 changes: 6 additions & 1 deletion AppCenter/AppCenter/Internals/Model/MSACStartServiceLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
@interface MSACStartServiceLog : MSACAbstractLog <MSACNoAutoAssignSessionIdLog>

/**
* Services which started with SDK
* Services which started with SDK.
*/
@property(nonatomic) NSArray<NSString *> *services;

/**
* OneCollector usage status.
*/
@property(nonatomic) BOOL isOneCollectorEnabled;

@end
5 changes: 5 additions & 0 deletions AppCenter/AppCenter/Internals/Model/MSACStartServiceLog.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

static NSString *const kMSACStartService = @"startService";
static NSString *const kMSACServices = @"services";
static NSString *const kMSACIsOneCollectorEnabled = @"isOneCollectorEnabled";

@implementation MSACStartServiceLog

@synthesize services = _services;
@synthesize isOneCollectorEnabled = _isOneCollectorEnabled;

- (instancetype)init {
if ((self = [super init])) {
Expand All @@ -31,6 +33,7 @@ - (NSMutableDictionary *)serializeToDictionary {
NSMutableDictionary *dict = [super serializeToDictionary];
if (self.services) {
dict[kMSACServices] = self.services;
dict[kMSACIsOneCollectorEnabled] = @(self.isOneCollectorEnabled);
}
return dict;
}
Expand All @@ -40,13 +43,15 @@ - (NSMutableDictionary *)serializeToDictionary {
- (instancetype)initWithCoder:(NSCoder *)coder {
if ((self = [super initWithCoder:coder])) {
self.services = [coder decodeObjectForKey:kMSACServices];
self.isOneCollectorEnabled = [coder decodeBoolForKey:kMSACIsOneCollectorEnabled];
}
return self;
}

- (void)encodeWithCoder:(NSCoder *)coder {
[super encodeWithCoder:coder];
[coder encodeObject:self.services forKey:kMSACServices];
[coder encodeBool:self.isOneCollectorEnabled forKey:kMSACIsOneCollectorEnabled];
}

@end
Loading

0 comments on commit 16d6ed7

Please sign in to comment.