Merge develop to master for release 5.0.0 (#2439)

* Add `$schema` to `cgmanifest.json`

* Microsoft mandatory file

* Create CODEOWNERS

* Fix Xcode 14 errors and bump min iOS version

* Update macOS to 11 and Xcode to 13 for CI builds

* Update PLCrashReporter to 1.11.0

* Add check for "-Wobjc-load-method" warning existance

* bump plcr version to 1.11.0

* Increased job timeout

* Fix tests. We should not rely on [NSBundle mainBundle] in tests

* Remove  checks for armv7 and  i386 architectures

* Update Changelog

* Update CHANGELOG.md

* Build dynamic libraries

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fix archName after encoding/decoding (#2420)

* Fix archName after encoding/decoding

* remove redundant tests

* add primaryArchitectureId and architectureVariantId checks

* remove redundant var

* add test cases

* bump version to 5.0.0

Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>
Co-authored-by: Anatoly Pristensky <v-anatpr@microsoft.com>
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
Co-authored-by: Evgenii Utkin <evutkin@microsoft.com>
Co-authored-by: Ivan Matkov <ivan.matkov@akvelon.com>
Co-authored-by: Dmitriy Kirakosyan <v-dmkira@microsoft.com>
Co-authored-by: Pierre-Yves B <py.bertholon@gmail.com>
Co-authored-by: Ivan Matkov <v-ivanmatkov@microsoft.com>
This commit is contained in:
MikhailSuendukov 2022-10-25 15:44:54 +03:00 коммит произвёл GitHub
Родитель b2dc99cfed
Коммит 88e65475ff
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
36 изменённых файлов: 214 добавлений и 304 удалений

Просмотреть файл

@ -10,7 +10,7 @@ jobs:
- job:
displayName: ${{ format('{0} {1}', parameters.platform, module) }}
pool:
vmImage: internal-macos-10.15
vmImage: macos-12
steps:
- checkout: self
submodules: recursive
@ -27,7 +27,7 @@ jobs:
scheme: '${{ module }} ${{ parameters.platform }} Framework'
destinationPlatformOption: ${{ parameters.platform }}
${{ if eq(parameters.platform, 'iOS') }}:
destinationSimulators: 'iPhone 11'
destinationSimulators: 'iPhone 13'
${{ if eq(parameters.platform, 'tvOS') }}:
destinationSimulators: 'Apple TV'
@ -43,7 +43,7 @@ jobs:
scheme: '${{ module }} ${{ parameters.platform }} Framework'
destinationPlatformOption: ${{ parameters.platform }}
${{ if eq(parameters.platform, 'iOS') }}:
destinationSimulators: 'iPhone 11'
destinationSimulators: 'iPhone 13'
${{ if eq(parameters.platform, 'tvOS') }}:
destinationSimulators: 'Apple TV'
publishJUnitResults: true

Просмотреть файл

@ -1,78 +0,0 @@
parameters:
- name: modules
type: object
steps:
- ${{ each module in parameters.modules }}:
- ${{ if ne(module, 'AppCenterDistribute') }}:
- task: Xcode@5
displayName: ${{ format('Build {0} macOS Framework for Apple Silicon', module) }}
inputs:
xcWorkspacePath: AppCenter.xcworkspace
scheme: '${{ module }} macOS Framework'
xcodeVersion: specifyPath
xcodeDeveloperDir: '$(APPLE_SILICON_XCODE_PATH)'
args: 'SYMROOT="$(Build.BinariesDirectory)" ONLY_ACTIVE_ARCH=NO ARCHS=arm64'
- task: Xcode@5
displayName: ${{ format('Build {0} Mac Catalyst for Apple Silicon', module) }}
inputs:
xcWorkspacePath: AppCenter.xcworkspace
scheme: '${{ module }} iOS Framework'
xcodeVersion: specifyPath
xcodeDeveloperDir: '$(APPLE_SILICON_XCODE_PATH)'
destinationPlatformOption: macOS
args: 'SYMROOT="$(Build.BinariesDirectory)" ONLY_ACTIVE_ARCH=NO ARCHS=arm64'
- task: Xcode@5
displayName: ${{ format('Build {0} tvOS for Simulators on Apple Silicon', module) }}
inputs:
xcWorkspacePath: AppCenter.xcworkspace
scheme: '${{ module }} tvOS Framework'
xcodeVersion: specifyPath
xcodeDeveloperDir: '$(APPLE_SILICON_XCODE_PATH)'
destinationPlatformOption: tvOS
destinationTypeOption: simulators
destinationSimulators: 'Apple TV'
args: 'SYMROOT="$(Build.BinariesDirectory)" ONLY_ACTIVE_ARCH=NO ARCHS=arm64'
- task: Xcode@5
displayName: ${{ format('Build {0} iOS for Simulators on Apple Silicon', module) }}
inputs:
xcWorkspacePath: AppCenter.xcworkspace
scheme: '${{ module }} iOS Framework'
xcodeVersion: specifyPath
xcodeDeveloperDir: '$(APPLE_SILICON_XCODE_PATH)'
destinationPlatformOption: iOS
destinationTypeOption: simulators
destinationSimulators: 'iPhone 11'
args: 'SYMROOT="$(Build.BinariesDirectory)" ONLY_ACTIVE_ARCH=NO ARCHS=arm64'
- bash: |
append_to_framework() {
if [ ! -e "$1" ]; then
return 1
fi
local binary="$1/Versions/A/${{ module }}"
[[ ! -e "$binary" ]] && binary="$1/${{ module }}"
lipo "$binary" "$2/${{ module }}" -create -output "$binary"
lipo -info "$binary"
}
append_to_xcframework() {
append_to_framework \
"$BUILD_BINARIESDIRECTORY/Release-xcframework/${{ module }}.xcframework/$1/${{ module }}.framework" \
"$BUILD_BINARIESDIRECTORY/Release-$2/${{ module }}.framework"
}
append_to_framework "AppCenter-SDK-Apple/macOS/${{ module }}.framework" "$BUILD_BINARIESDIRECTORY/Release/${{ module }}.framework"
append_to_framework "$BUILD_BINARIESDIRECTORY/Release-xcframework/${{ module }}.xcframework/macos-x86_64/${{ module }}.framework" "$BUILD_BINARIESDIRECTORY/Release/${{ module }}.framework"
append_to_xcframework ios-i386_x86_64-simulator iphonesimulator
append_to_xcframework ios-x86_64-maccatalyst maccatalyst
append_to_xcframework tvos-x86_64-simulator appletvsimulator
rm -rf "AppCenter-SDK-Apple/XCFramework/${{ module }}.xcframework"
for framework in $BUILD_BINARIESDIRECTORY/Release-xcframework/${{ module }}.xcframework/*/${{ module }}.framework; do
xcframeworks+=( -framework "$framework")
done
xcodebuild -create-xcframework "${xcframeworks[@]}" -output "AppCenter-SDK-Apple/XCFramework/${{ module }}.xcframework"
ls "AppCenter-SDK-Apple/XCFramework/${{ module }}.xcframework"
displayName: ${{ format('Combine {0} Apple Silicon Binaries', module) }}

Просмотреть файл

@ -8,16 +8,15 @@ pr:
- feature/*
pool:
vmImage: internal-macos-10.15
vmImage: macos-12
variables:
Configuration: Release
SDK:
EOCompliance-Mac: true
# Xcode 11.3.1 version is the last one that has compatible bitcode with Xcode 11.0 (minimal supported).
XCODE_PATH: '/Applications/Xcode_11.3.1.app/Contents/Developer'
APPLE_SILICON_XCODE_PATH: '/Applications/Xcode_12.2.app/Contents/Developer'
# Xcode 13.2.1 version is the last one that has compatible bitcode with Xcode 13.0 (minimal supported).
XCODE_PATH: '/Applications/Xcode_13.2.1.app/Contents/Developer'
jobs:
- job:
@ -44,11 +43,7 @@ jobs:
xcodeVersion: specifyPath
xcodeDeveloperDir: '$(XCODE_PATH)'
args: 'SYMROOT="$(Build.BinariesDirectory)"'
timeoutInMinutes: 15
- template: build-apple-silicon-framework-template.yml
parameters:
modules: [ AppCenter, AppCenterAnalytics, AppCenterCrashes, AppCenterDistribute ]
timeoutInMinutes: 50
- task: Xcode@5
displayName: Generate App Center Documentation

Просмотреть файл

@ -4,7 +4,7 @@ pr:
- feature/*
pool:
vmImage: internal-macos-10.15
vmImage: macos-12
variables:
Configuration: Release

1
.github/CODEOWNERS поставляемый Normal file
Просмотреть файл

@ -0,0 +1 @@
* @microsoft/appcenter-fte

Просмотреть файл

@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.cocoapods_version = '>= 1.10'
s.name = 'AppCenter'
s.version = '4.4.3'
s.version = '5.0.0'
s.summary = 'Visual Studio App Center is your continuous integration, delivery and learning solution for iOS and macOS apps.'
s.description = <<-DESC
@ -28,7 +28,7 @@ Pod::Spec.new do |s|
s.license = { :type => 'MIT', :file => 'AppCenter-SDK-Apple/LICENSE' }
s.author = { 'Microsoft' => 'appcentersdk@microsoft.com' }
s.ios.deployment_target = '9.0'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '11.0'
s.source = { :http => "https://github.com/microsoft/appcenter-sdk-apple/releases/download/#{s.version}/AppCenter-SDK-Apple-XCFramework-#{s.version}.zip" }

Просмотреть файл

@ -15,6 +15,11 @@ static dispatch_once_t swizzlingOnceToken;
@implementation MSACAppDelegateForwarder
#pragma clang diagnostic push
#if __has_warning("-Wobjc-load-method")
#pragma clang diagnostic ignored "-Wobjc-load-method"
#endif
+ (void)load {
/*
@ -26,6 +31,8 @@ static dispatch_once_t swizzlingOnceToken;
[[MSACAppDelegateForwarder sharedInstance] setEnabledFromPlistForKey:kMSACAppDelegateForwarderEnabledKey];
}
#pragma clang diagnostic pop
- (instancetype)init {
if ((self = [super init])) {
#if !TARGET_OS_OSX && !TARGET_OS_MACCATALYST

Просмотреть файл

@ -19,7 +19,7 @@ static NSMutableArray<dispatch_block_t> *traceBuffer = nil;
@synthesize enabled = _enabled;
+ (void)load {
+ (void)initialize {
traceBuffer = [NSMutableArray new];
}

Просмотреть файл

@ -13,6 +13,11 @@ static int sqliteConfigurationResult = SQLITE_ERROR;
@implementation MSACDBStorage
#pragma clang diagnostic push
#if __has_warning("-Wobjc-load-method")
#pragma clang diagnostic ignored "-Wobjc-load-method"
#endif
+ (void)load {
/*
@ -22,6 +27,8 @@ static int sqliteConfigurationResult = SQLITE_ERROR;
sqliteConfigurationResult = [self configureSQLite];
}
#pragma clang diagnostic pop
- (instancetype)initWithSchema:(MSACDBSchema *)schema version:(NSUInteger)version filename:(NSString *)filename {
_schema = schema;

Просмотреть файл

@ -16,7 +16,7 @@ static NSString *const kMSACLastWrapperExceptionFileName = @"last_saved_wrapper_
static NSMutableDictionary *unprocessedWrapperExceptions;
static PLCrashReporter *_crashReporter = nil;
+ (void)load {
+ (void)initialize {
unprocessedWrapperExceptions = [NSMutableDictionary new];
}

Просмотреть файл

@ -95,9 +95,4 @@
*/
@property(nonatomic) MSACExceptionModel *exception;
/**
* Is current CPU type encoding known.
*/
@property(nonatomic) BOOL isKnownEncodingType;
@end

Просмотреть файл

@ -230,10 +230,8 @@ static const char *findSEL(const char *imageName, NSString *imageUUID, uint64_t
// CPU Type and Subtype for the crash. We need to query the binary images for that.
uint64_t type = report.machineInfo.processorInfo.type;
uint64_t subtype = report.machineInfo.processorInfo.subtype;
BOOL isKnownEncodingType = report.systemInfo.processorInfo.typeEncoding == PLCrashReportProcessorTypeEncodingMach;
for (PLCrashReportBinaryImageInfo *image in report.images) {
isKnownEncodingType = image.codeType.typeEncoding == PLCrashReportProcessorTypeEncodingMach;
if (image.codeType != nil && isKnownEncodingType) {
if (image.codeType != nil && image.codeType.typeEncoding == PLCrashReportProcessorTypeEncodingMach) {
type = image.codeType.type;
subtype = image.codeType.subtype;
break;
@ -242,7 +240,6 @@ static const char *findSEL(const char *imageName, NSString *imageUUID, uint64_t
BOOL is64bit = [self isCodeType64bit:type];
errorLog.primaryArchitectureId = @(type);
errorLog.architectureVariantId = @(subtype);
errorLog.isKnownEncodingType = isKnownEncodingType;
/*
* errorLog.architecture is an optional. The Android SDK will set it while for
@ -317,7 +314,7 @@ static const char *findSEL(const char *imageName, NSString *imageUUID, uint64_t
NSDate *appErrorTime = errorLog.timestamp;
NSString *codeType = unknownString;
NSString *archName = unknownString;
if (errorLog.isKnownEncodingType && errorLog.primaryArchitectureId != nil) {
if (errorLog.primaryArchitectureId != nil) {
codeType = [self convertCodeTypeToString:errorLog.primaryArchitectureId.longValue];
if (errorLog.architectureVariantId != nil) {
archName = [self convertArchNameToString:errorLog.primaryArchitectureId.longValue subtype:errorLog.architectureVariantId.intValue];
@ -393,7 +390,7 @@ static const char *findSEL(const char *imageName, NSString *imageUUID, uint64_t
}
+ (NSString *)convertArchNameToString:(long)type subtype:(int)subtype {
NSString *archName = @"???";
NSString *archName = unknownString;
switch (type) {
case CPU_TYPE_ARM:
switch (subtype & ~CPU_SUBTYPE_MASK) {

Просмотреть файл

@ -147,7 +147,6 @@ static NSArray *kMacOSCrashReportsParameters = @[
errorLog.applicationPath = applicationPath;
errorLog.primaryArchitectureId = codeType;
errorLog.architectureVariantId = archName;
errorLog.isKnownEncodingType = true;
// Then.
NSString *codeTypeText = @"ARM";
@ -736,13 +735,12 @@ static NSArray *kMacOSCrashReportsParameters = @[
}
#endif
- (void)checkIfCodeTypeConvertedCorrectly:(NSNumber *)codeType isKnownEncodingType:(BOOL)isKnownEncodingType expectedType:(NSString *)expectedType {
- (void)checkIfCodeTypeConvertedCorrectly:(NSNumber *)codeType expectedType:(NSString *)expectedType {
// Init apple error log with codeType and acrhName.
MSACAppleErrorLog *errorLog = [MSACAppleErrorLog new];
errorLog.primaryArchitectureId = codeType;
errorLog.isKnownEncodingType = isKnownEncodingType;
// Convert apple error log to error report.
MSACErrorReport *errorReport = [MSACErrorLogFormatter errorReportFromLog:errorLog];
@ -750,14 +748,13 @@ static NSArray *kMacOSCrashReportsParameters = @[
XCTAssertEqual(errorReport.codeType, expectedType);
}
- (void)checkIfArchNameConvertedCorrectly:(NSNumber *)codeType archName:(NSNumber *)archName isKnownEncodingType:(BOOL)isKnownEncodingType expectedName:(NSString *)expectedName {
- (void)checkIfArchNameConvertedCorrectly:(NSNumber *)codeType archName:(NSNumber *)archName expectedName:(NSString *)expectedName {
// Init apple error log with codeType and acrhName.
MSACAppleErrorLog *errorLog = [MSACAppleErrorLog new];
errorLog.primaryArchitectureId = codeType;
errorLog.architectureVariantId = archName;
errorLog.isKnownEncodingType = isKnownEncodingType;
// Convert apple error log to error report.
MSACErrorReport *errorReport = [MSACErrorLogFormatter errorReportFromLog:errorLog];
@ -766,97 +763,26 @@ static NSArray *kMacOSCrashReportsParameters = @[
}
- (void)testConvertCodeTypeToString {
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_ARM) isKnownEncodingType:YES expectedType:@"ARM"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_ARM64) isKnownEncodingType:YES expectedType:@"ARM-64"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_X86) isKnownEncodingType:YES expectedType:@"X86"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_X86_64) isKnownEncodingType:YES expectedType:@"X86-64"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_POWERPC) isKnownEncodingType:YES expectedType:@"PPC"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_ARM) expectedType:@"ARM"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_ARM64) expectedType:@"ARM-64"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_X86) expectedType:@"X86"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_X86_64) expectedType:@"X86-64"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_POWERPC) expectedType:@"PPC"];
}
- (void)testConvertArchNameToString {
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM)
archName:@(CPU_SUBTYPE_ARM_V6)
isKnownEncodingType:YES
expectedName:@"armv6"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM)
archName:@(CPU_SUBTYPE_ARM_V7)
isKnownEncodingType:YES
expectedName:@"armv7"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM)
archName:@(CPU_SUBTYPE_ARM_V7S)
isKnownEncodingType:YES
expectedName:@"armv7s"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64)
archName:@(CPU_SUBTYPE_ARM64_ALL)
isKnownEncodingType:YES
expectedName:@"arm64"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64)
archName:@(CPU_SUBTYPE_ARM64_V8)
isKnownEncodingType:YES
expectedName:@"armv8"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64)
archName:@(CPU_SUBTYPE_ARM64E)
isKnownEncodingType:YES
expectedName:@"arm64e"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_X86)
archName:@(CPU_TYPE_X86)
isKnownEncodingType:YES
expectedName:@"i386"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_X86_64)
archName:@(CPU_TYPE_X86_64)
isKnownEncodingType:YES
expectedName:@"x86_64"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_POWERPC)
archName:@(CPU_TYPE_POWERPC)
isKnownEncodingType:YES
expectedName:@"powerpc"];
}
- (void)testConvertCodeTypeUnknownEncodingTypeToString {
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_ARM) isKnownEncodingType:NO expectedType:@"???"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_ARM64) isKnownEncodingType:NO expectedType:@"???"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_X86) isKnownEncodingType:NO expectedType:@"???"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_X86_64) isKnownEncodingType:NO expectedType:@"???"];
[self checkIfCodeTypeConvertedCorrectly:@(CPU_TYPE_POWERPC) isKnownEncodingType:NO expectedType:@"???"];
}
- (void)testConvertArchNameUnknownEncodingTypeToString {
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM)
archName:@(CPU_SUBTYPE_ARM_V6)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM)
archName:@(CPU_SUBTYPE_ARM_V7)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM)
archName:@(CPU_SUBTYPE_ARM_V7S)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64)
archName:@(CPU_SUBTYPE_ARM64_ALL)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64)
archName:@(CPU_SUBTYPE_ARM64_V8)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64)
archName:@(CPU_SUBTYPE_ARM64E)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_X86)
archName:@(CPU_TYPE_X86)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_X86_64)
archName:@(CPU_TYPE_X86_64)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_POWERPC)
archName:@(CPU_TYPE_POWERPC)
isKnownEncodingType:NO
expectedName:@"???"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM) archName:@(CPU_SUBTYPE_ARM_V6) expectedName:@"armv6"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM) archName:@(CPU_SUBTYPE_ARM_V7) expectedName:@"armv7"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM) archName:@(CPU_SUBTYPE_ARM_V7S) expectedName:@"armv7s"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM) archName:@(-1) expectedName:@"arm-unknown"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64) archName:@(CPU_SUBTYPE_ARM64_ALL) expectedName:@"arm64"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64) archName:@(CPU_SUBTYPE_ARM64_V8) expectedName:@"armv8"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64) archName:@(CPU_SUBTYPE_ARM64E) expectedName:@"arm64e"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_ARM64) archName:@(-1) expectedName:@"arm64-unknown"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_X86) archName:@(CPU_TYPE_X86) expectedName:@"i386"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_X86_64) archName:@(CPU_TYPE_X86_64) expectedName:@"x86_64"];
[self checkIfArchNameConvertedCorrectly:@(CPU_TYPE_POWERPC) archName:@(CPU_TYPE_POWERPC) expectedName:@"powerpc"];
[self checkIfArchNameConvertedCorrectly:@(-1) archName:@(-1) expectedName:@"???"];
}
@end

Просмотреть файл

@ -39,6 +39,11 @@
@implementation MSACAppDelegateForwarder (MSACDistribute)
#pragma clang diagnostic push
#if __has_warning("-Wobjc-load-method")
#pragma clang diagnostic ignored "-Wobjc-load-method"
#endif
+ (void)load {
// Register selectors to swizzle for Distribute.
@ -46,4 +51,6 @@
[[MSACAppDelegateForwarder sharedInstance] addDelegateSelectorToSwizzle:@selector(application:openURL:sourceApplication:annotation:)];
}
#pragma clang diagnostic pop
@end

Просмотреть файл

@ -68,8 +68,10 @@ static NSUInteger const kMSACBytesToRead = 10;
// Then
XCTAssertNotNil(parserForMainBundle);
XCTAssertNotNil(parserForMainBundle.uuid);
XCTAssertTrue([parserForBundle.uuid isEqual:parserForMainBundle.uuid]);
// In test environment [NSBundle mainBundle] does not always return a valid bundle.
// In such case uuid will be nil, and we should check that it is also nil when we call [MSACBasicMachOParser machOParserForMainBundle].
XCTAssertTrue((!parserForBundle.uuid && !parserForMainBundle.uuid) || [parserForBundle.uuid isEqual:parserForMainBundle.uuid]);
}
- (void)testReadDataFromFileReturnsNOIfCannotRead {

Просмотреть файл

@ -1,7 +1,21 @@
# App Center SDK for iOS, macOS and tvOS Change Log
## Version 5.0.0
### App Center
* **[Feature] Add Xcode 14 support. Xcode 11 and Xcode 12 are out of support now. Bump minumum supported iOS version to iOS 11.
### App Center Crashes
* **[Improvement]** Update PLCrashReporter to 1.11.0.
## Version 4.4.3
### App Center
* **[Fix]** Fix SwiftUI Preview in Xcode 14 when adding App Center SDK through SwiftPM.
### App Center Crashes
* **[Improvement]** Update PLCrashReporter to 1.10.2.

Просмотреть файл

@ -1,7 +1,7 @@
#include "./Version.xcconfig"
// :Mark: Deployment
IPHONEOS_DEPLOYMENT_TARGET = 9.0
IPHONEOS_DEPLOYMENT_TARGET = 11.0
TVOS_DEPLOYMENT_TARGET = 11.0
MACOSX_DEPLOYMENT_TARGET = 10.9
WATCHOS_DEPLOYMENT_TARGET = 3.2

Просмотреть файл

@ -4,7 +4,7 @@
SDKROOT = iphoneos
// :Mark: Deployment
IPHONEOS_DEPLOYMENT_TARGET = 9.0
IPHONEOS_DEPLOYMENT_TARGET = 11.0
TVOS_DEPLOYMENT_TARGET = 11.0
MACOSX_DEPLOYMENT_TARGET = 10.9
COPY_PHASE_STRIP = NO

Просмотреть файл

@ -1,2 +1,2 @@
BUILD_NUMBER = 1
VERSION_STRING = 4.4.3
VERSION_STRING = 5.0.0

Просмотреть файл

@ -1,7 +1,7 @@
SDKROOT = iphoneos
TARGETED_DEVICE_FAMILY = 1,2
SUPPORTS_MACCATALYST = YES
ARCHS[sdk=iphoneos*] = $(ARCHS_STANDARD) armv7s arm64e
ARCHS[sdk=iphoneos*] = $(ARCHS_STANDARD) arm64e
SKIP_INSTALL = YES
OTHER_CFLAGS = $(inherited) -fembed-bitcode-marker

Просмотреть файл

@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../../Themes/apple
module: AppCenter
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../../Themes/apple
module: AppCenterAnalytics
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../../Themes/apple
module: AppCenterCrashes
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: iphonesimulator
theme: ../../Themes/apple
module: AppCenterDistribute
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: macosx
theme: ../../Themes/apple
module: AppCenter
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: macosx
theme: ../../Themes/apple
module: AppCenterAnalytics
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: macosx
theme: ../../Themes/apple
module: AppCenterCrashes
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: appletvsimulator
theme: ../../Themes/apple
module: AppCenter
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: appletvsimulator
theme: ../../Themes/apple
module: AppCenterAnalytics
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -5,7 +5,7 @@ sdk: appletvsimulator
theme: ../../Themes/apple
module: AppCenterCrashes
module_version: 4.4.3
module_version: 5.0.0
author: Microsoft Corp
author_url: http://www.microsoft.com

Просмотреть файл

@ -53,22 +53,20 @@ let cHeaderSearchPaths: [CSetting] = projectHeaderSearchPaths.map { .headerSearc
let package = Package(
name: "AppCenter",
platforms: [
.iOS(.v9),
.iOS(.v11),
.macOS(.v10_10),
.tvOS(.v11)
],
products: [
.library(
name: "AppCenterAnalytics",
type: .static,
targets: ["AppCenterAnalytics"]),
.library(
name: "AppCenterCrashes",
type: .static,
targets: ["AppCenterCrashes"])
],
dependencies: [
.package(url: "https://github.com/microsoft/plcrashreporter.git", .upToNextMinor(from: "1.10.2")),
.package(url: "https://github.com/microsoft/plcrashreporter.git", .upToNextMinor(from: "1.11.0")),
],
targets: [
.target(
@ -77,7 +75,7 @@ let package = Package(
exclude: ["Support"],
cSettings: {
var settings: [CSetting] = [
.define("APP_CENTER_C_VERSION", to: "\"4.4.3\""),
.define("APP_CENTER_C_VERSION", to:"\"5.0.0\""),
.define("APP_CENTER_C_BUILD", to: "\"1\"")
]
settings.append(contentsOf: cHeaderSearchPaths)

Просмотреть файл

@ -54,26 +54,23 @@ let package = Package(
name: "AppCenter",
defaultLocalization: "en",
platforms: [
.iOS(.v9),
.iOS(.v11),
.macOS(.v10_10),
.tvOS(.v11)
],
products: [
.library(
name: "AppCenterAnalytics",
type: .static,
targets: ["AppCenterAnalytics"]),
.library(
name: "AppCenterCrashes",
type: .static,
targets: ["AppCenterCrashes"]),
.library(
name: "AppCenterDistribute",
type: .static,
targets: ["AppCenterDistribute"]),
],
dependencies: [
.package(url: "https://github.com/microsoft/PLCrashReporter.git", .upToNextMinor(from: "1.10.2")),
.package(url: "https://github.com/microsoft/PLCrashReporter.git", .upToNextMinor(from: "1.11.0")),
],
targets: [
.target(
@ -82,7 +79,7 @@ let package = Package(
exclude: ["Support"],
cSettings: {
var settings: [CSetting] = [
.define("APP_CENTER_C_VERSION", to: "\"4.4.3\""),
.define("APP_CENTER_C_VERSION", to:"\"5.0.0\""),
.define("APP_CENTER_C_BUILD", to: "\"1\"")
]
settings.append(contentsOf: cHeaderSearchPaths)

41
SECURITY.md Normal file
Просмотреть файл

@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
## Security
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
## Reporting Security Issues
**Please do not report security vulnerabilities through public GitHub issues.**
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
## Preferred Languages
We prefer all communications to be in English.
## Policy
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
<!-- END MICROSOFT SECURITY.MD BLOCK -->

Просмотреть файл

@ -97,12 +97,12 @@ function verify_architectures() {
verify_framework_architectures "$framework" ${@:2} || return $?
done
}
verify_architectures "iOS/*.framework" armv7 armv7s arm64 arm64e i386 x86_64 || exit $?
verify_architectures "iOS/*.framework" arm64 arm64e x86_64 || exit $?
verify_architectures "macOS/*.framework" arm64 x86_64 || exit $?
verify_architectures "tvOS/*.framework" arm64 x86_64 || exit $?
verify_architectures "XCFramework/*.xcframework/ios-!(*-*)/*.framework" armv7 armv7s arm64 arm64e || exit $?
verify_architectures "XCFramework/*.xcframework/ios-!(*-*)/*.framework" arm64 arm64e || exit $?
verify_architectures "XCFramework/*.xcframework/ios-*-maccatalyst/*.framework" arm64 x86_64 || exit $?
verify_architectures "XCFramework/*.xcframework/ios-*-simulator/*.framework" arm64 i386 x86_64 || exit $?
verify_architectures "XCFramework/*.xcframework/ios-*-simulator/*.framework" arm64 x86_64 || exit $?
verify_architectures "XCFramework/*.xcframework/macos-*/*.framework" arm64 x86_64 || exit $?
verify_architectures "XCFramework/*.xcframework/tvos-!(*-*)/*.framework" arm64 || exit $?
verify_architectures "XCFramework/*.xcframework/tvos-*-simulator/*.framework" arm64 x86_64 || exit $?

2
Vendor/PLCrashReporter поставляемый

@ -1 +1 @@
Subproject commit 1edf9be2c83172e7f9e3c72ffe42f07c41106f02
Subproject commit cfa78077d4ee2b363b60ce03948026b6c4ca1033

Просмотреть файл

@ -1,75 +1,76 @@
{
"Registrations": [
{
"component": {
"type": "git",
"git": {
"name": "PLCrashReporter",
"repositoryUrl": "https://github.com/microsoft/plcrashreporter.git",
"commitHash": "1edf9be2c83172e7f9e3c72ffe42f07c41106f02"
}
}
},
{
"component": {
"type": "git",
"git": {
"name": "OCHamcrest",
"repositoryUrl": "https://github.com/hamcrest/OCHamcrest.git",
"commitHash": "5f77cf33732dfa02e0b9f15e43d05a9110cc2ff0"
}
}
},
{
"component": {
"type": "git",
"git": {
"name": "OCMock",
"repositoryUrl": "https://github.com/erikdoe/ocmock.git",
"commitHash": "a8e58d45b47f0a8aca04dcba4980b7ee6ffc06dc"
}
}
},
{
"component": {
"type": "git",
"git": {
"name":"OHHTTPStubs",
"repositoryUrl": "https://github.com/AliSoftware/OHHTTPStubs.git",
"commitHash": "e92b5a5746ef16add2a1424f1fc19529d9a75cde"
}
}
},
{
"component": {
"type": "git",
"git": {
"name": "Official Git mirror of the SQLite source tree",
"repositoryUrl": "https://github.com/sqlite/sqlite.git",
"commitHash": "562fd18b9dc27216191c0a6477bba9b175f7f0d2"
}
}
},
{
"component": {
"type": "git",
"git": {
"name": "Protocol Buffers implementation in C",
"repositoryUrl": "https://github.com/protobuf-c/protobuf-c.git",
"commitHash": "1390409f4ee4e26d0635310995b516eb702c3f9e"
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "Reachability",
"version": "5.0",
"downloadUrl": "https://developer.apple.com/library/archive/samplecode/Reachability/Reachability.zip"
}
}
"$schema": "https://json.schemastore.org/component-detection-manifest.json",
"Registrations": [
{
"component": {
"type": "git",
"git": {
"name": "PLCrashReporter",
"repositoryUrl": "https://github.com/microsoft/plcrashreporter.git",
"commitHash": "cfa78077d4ee2b363b60ce03948026b6c4ca1033"
}
],
"Version": 1
}
},
{
"component": {
"type": "git",
"git": {
"name": "OCHamcrest",
"repositoryUrl": "https://github.com/hamcrest/OCHamcrest.git",
"commitHash": "5f77cf33732dfa02e0b9f15e43d05a9110cc2ff0"
}
}
},
{
"component": {
"type": "git",
"git": {
"name": "OCMock",
"repositoryUrl": "https://github.com/erikdoe/ocmock.git",
"commitHash": "a8e58d45b47f0a8aca04dcba4980b7ee6ffc06dc"
}
}
},
{
"component": {
"type": "git",
"git": {
"name": "OHHTTPStubs",
"repositoryUrl": "https://github.com/AliSoftware/OHHTTPStubs.git",
"commitHash": "e92b5a5746ef16add2a1424f1fc19529d9a75cde"
}
}
},
{
"component": {
"type": "git",
"git": {
"name": "Official Git mirror of the SQLite source tree",
"repositoryUrl": "https://github.com/sqlite/sqlite.git",
"commitHash": "562fd18b9dc27216191c0a6477bba9b175f7f0d2"
}
}
},
{
"component": {
"type": "git",
"git": {
"name": "Protocol Buffers implementation in C",
"repositoryUrl": "https://github.com/protobuf-c/protobuf-c.git",
"commitHash": "1390409f4ee4e26d0635310995b516eb702c3f9e"
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "Reachability",
"version": "5.0",
"downloadUrl": "https://developer.apple.com/library/archive/samplecode/Reachability/Reachability.zip"
}
}
}
],
"Version": 1
}