Skip to content

Commit

Permalink
Merge pull request #2542 from microsoft/develop
Browse files Browse the repository at this point in the history
Merge develop to master for release 5.0.5
  • Loading branch information
DmitriyKirakosyan authored Apr 26, 2024
2 parents 1120c26 + ee8596c commit ab54f75
Show file tree
Hide file tree
Showing 31 changed files with 416 additions and 441 deletions.
134 changes: 134 additions & 0 deletions .azure-pipelines/build-frameworks-and-docs-1ES.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
trigger:
- master
- develop
pr:
- master
- develop
- feature/*
variables:
Configuration: Release
SDK: ''
EOCompliance-Mac: true
XCODE_PATH: '/Applications/Xcode_13.2.1.app/Contents/Developer'
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
${{ else }}:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: Azure Pipelines
image: macos-latest
os: macOS
customBuildTags:
- ES365AIMigrationTooling-BulkMigrated
sdl:
sourceAnalysisPool: 1ES-PT-Windows-2022
stages:
- stage: stage
jobs:
- job: sdkBuildJob
displayName: Build SDK for All Platforms
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Publish Artifacts'
path: '$(Build.ArtifactStagingDirectory)'
artifactName: Release
steps:
- checkout: self
submodules: recursive
- bash: |
version="$(Scripts/framework-version.sh)+$(git rev-parse --short $BUILD_SOURCEVERSION)"
echo "Change version to $version"
Scripts/framework-version.sh "$version"
displayName: 'Update Version'
condition: ne(variables['Build.SourceBranch'], 'refs/heads/master')
- bash: 'sudo gem install jazzy --no-document'
displayName: 'Install Jazzy'
- task: Xcode@5
displayName: Build App Center Frameworks
inputs:
xcWorkspacePath: AppCenter.xcworkspace
scheme: 'All App Center Frameworks'
xcodeVersion: specifyPath
xcodeDeveloperDir: '$(XCODE_PATH)'
args: 'SYMROOT="$(Build.BinariesDirectory)" GCC_TREAT_WARNINGS_AS_ERRORS=YES SWIFT_TREAT_WARNINGS_AS_ERRORS=YES'
timeoutInMinutes: 50
- task: Xcode@5
displayName: Generate App Center Documentation
inputs:
xcWorkspacePath: AppCenter.xcworkspace
scheme: 'All App Center Documentation'
- task: Bash@3
displayName: Archive
inputs:
targetType: filePath
filePath: './Scripts/create-archive.sh'
- task: CopyFiles@2
displayName: 'Copy Archives to Staging Directory'
inputs:
SourceFolder: './AppCenter-SDK-Apple'
Contents: '**/AppCenter-SDK-Apple*.zip'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- job: collectVersionInfo
displayName: Version Information
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Publish Version Information'
targetPath: '$(Build.ArtifactStagingDirectory)/Info'
artifactName: Info
sbomEnabled: false
steps:
- bash: |
swift --version
swift package describe
displayName: 'Print Swift Package Information'
- bash: |
VERSION=$(Scripts/framework-version.sh)
mkdir -p $(Build.ArtifactStagingDirectory)/Info
echo $VERSION > $(Build.ArtifactStagingDirectory)/Info/VERSION
echo $BUILD_SOURCEVERSION > $(Build.ArtifactStagingDirectory)/Info/COMMIT
Scripts/get-release-notes.sh $VERSION > $(Build.ArtifactStagingDirectory)/Info/RELEASE.md
displayName: 'Collect Version Information'
- stage: APIScan
dependsOn: Stage
pool:
name: 1ES-PT-Windows-2022
os: windows
variables:
"agent.source.skip": true
jobs:
- job: APIScan
steps:
- task: DownloadPipelineArtifact@2
displayName: Download Build Artifacts for APIScan
inputs:
artifactName: Release
targetPath: '$(Agent.BuildDirectory)/Release'
- task: AzureKeyVault@2
inputs:
azureSubscription: 'AC - Dev Infra & Build Pool'
KeyVaultName: 'mobile-center-sdk'
SecretsFilter: 'appcenter-sdk-managed-identity-clientid'
RunAsPreJob: false
- task: APIScan@2
displayName: 'Run APIScan'
inputs:
softwareFolder: '$(Agent.BuildDirectory)\Release'
softwareName: 'appcenter-sdk-apple'
softwareVersionNum: '$(Build.BuildId)'
isLargeApp: false
toolVersion: 'Latest'
verbosityLevel: verbose
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
env:
AzureServicesAuthConnectionString: 'runAs=App;AppId=$(appcenter-sdk-managed-identity-clientid)'
6 changes: 5 additions & 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.4'
s.version = '5.0.5'

s.summary = 'Visual Studio App Center is your continuous integration, delivery and learning solution for iOS and macOS apps.'
s.description = <<-DESC
Expand Down Expand Up @@ -44,6 +44,7 @@ Pod::Spec.new do |s|
ss.tvos.frameworks = 'UIKit'
ss.vendored_frameworks = "AppCenter-SDK-Apple/AppCenter.xcframework"
ss.libraries = 'z', 'sqlite3'
ss.resource_bundle = { 'AppCenter' => 'AppCenter-SDK-Apple/AppCenter.xcframework/PrivacyInfo.xcprivacy' }
end

s.subspec 'Analytics' do |ss|
Expand All @@ -53,13 +54,15 @@ Pod::Spec.new do |s|
ss.osx.frameworks = 'AppKit'
ss.tvos.frameworks = 'UIKit'
ss.vendored_frameworks = "AppCenter-SDK-Apple/AppCenterAnalytics.xcframework"
ss.resource_bundle = { 'AppCenterAnalytics' => 'AppCenter-SDK-Apple/AppCenterAnalytics.xcframework/PrivacyInfo.xcprivacy' }
end

s.subspec 'Crashes' do |ss|
ss.dependency 'AppCenter/Core'
ss.frameworks = 'Foundation'
ss.libraries = 'z', 'c++'
ss.vendored_frameworks = "AppCenter-SDK-Apple/AppCenterCrashes.xcframework"
ss.resource_bundle = { 'AppCenterCrashes' => 'AppCenter-SDK-Apple/AppCenterCrashes.xcframework/PrivacyInfo.xcprivacy' }
end

s.subspec 'Distribute' do |ss|
Expand All @@ -69,6 +72,7 @@ Pod::Spec.new do |s|
ss.ios.weak_frameworks = 'SafariServices', 'AuthenticationServices'
ss.ios.resource_bundle = { 'AppCenterDistributeResources' => ['AppCenter-SDK-Apple/AppCenterDistributeResources.bundle/*.lproj'] }
ss.ios.vendored_frameworks = "AppCenter-SDK-Apple/AppCenterDistribute.xcframework"
ss.resource_bundle = { 'AppCenterDistribute' => 'AppCenter-SDK-Apple/AppCenterDistribute.xcframework/PrivacyInfo.xcprivacy' }
end

end
83 changes: 81 additions & 2 deletions AppCenter/AppCenter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
buildPhases = (
D5E3B3E9247C04D900D93E90 /* Build Mac Catalyst Framework */,
8414DF7924599AF800B316C5 /* Combine XCFramework */,
BB88D1F32BADB885002FEAED /* CopyFiles */,
BB88D1FE2BADD4FA002FEAED /* CopyFiles */,
BB88D2002BADD52B002FEAED /* CopyFiles */,
BB88D2022BADD549002FEAED /* CopyFiles */,
);
dependencies = (
C26F4E5A2546F38B006E0EB7 /* PBXTargetDependency */,
Expand Down Expand Up @@ -263,6 +267,10 @@
B29D884921E9286100EAF084 /* MSACOrderedDictionaryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = B29D884621E9286100EAF084 /* MSACOrderedDictionaryTest.m */; };
B2CD74CE1F22BFD00070E7DF /* MSACMockService.m in Sources */ = {isa = PBXBuildFile; fileRef = 805F3F6A1F209C9D00B489E4 /* MSACMockService.m */; };
B2FD53651E567BCF0050F909 /* MSACDeviceHistoryInfoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B2FD53641E567BCF0050F909 /* MSACDeviceHistoryInfoTests.m */; };
BB88D1FD2BADCB84002FEAED /* PrivacyInfo.xcprivacy in CopyFiles */ = {isa = PBXBuildFile; fileRef = D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */; };
BB88D1FF2BADD506002FEAED /* PrivacyInfo.xcprivacy in CopyFiles */ = {isa = PBXBuildFile; fileRef = D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */; };
BB88D2012BADD543002FEAED /* PrivacyInfo.xcprivacy in CopyFiles */ = {isa = PBXBuildFile; fileRef = D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */; };
BB88D2032BADD567002FEAED /* PrivacyInfo.xcprivacy in CopyFiles */ = {isa = PBXBuildFile; fileRef = D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */; };
C2392EF6246429B300425640 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2392EED2464279400425640 /* OCMock.framework */; };
C2392EF7246429CE00425640 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2392EE52464279400425640 /* OCMock.framework */; };
C2392EF8246429E200425640 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2392EEF2464279400425640 /* OCMock.framework */; };
Expand Down Expand Up @@ -409,6 +417,9 @@
D5812F352423C5DD00C5F5C5 /* MSACUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D5812F312423C2FA00C5F5C5 /* MSACUserDefaultsTests.m */; };
D5812F362423C5DF00C5F5C5 /* MSACUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D5812F312423C2FA00C5F5C5 /* MSACUserDefaultsTests.m */; };
D5812F372423C5E100C5F5C5 /* MSACUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D5812F312423C2FA00C5F5C5 /* MSACUserDefaultsTests.m */; };
D8C05A402B7CCED700458569 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */; };
D8C05A422B7CCEE200458569 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */; };
D8C05A442B7CCEF300458569 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */; };
DF5DA1F923A0E55500DE695C /* MSACDispatcherUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = DF5DA1F823A0E55500DE695C /* MSACDispatcherUtil.h */; };
DF5DA1FA23A0E55500DE695C /* MSACDispatcherUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = DF5DA1F823A0E55500DE695C /* MSACDispatcherUtil.h */; };
DF5DA1FB23A0E55500DE695C /* MSACDispatcherUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = DF5DA1F823A0E55500DE695C /* MSACDispatcherUtil.h */; };
Expand Down Expand Up @@ -1094,6 +1105,49 @@
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
BB88D1F32BADB885002FEAED /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = AppCenter.xcframework;
dstSubfolderSpec = 10;
files = (
BB88D1FD2BADCB84002FEAED /* PrivacyInfo.xcprivacy in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BB88D1FE2BADD4FA002FEAED /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = AppCenterAnalytics.xcframework;
dstSubfolderSpec = 10;
files = (
BB88D1FF2BADD506002FEAED /* PrivacyInfo.xcprivacy in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BB88D2002BADD52B002FEAED /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = AppCenterCrashes.xcframework;
dstSubfolderSpec = 10;
files = (
BB88D2012BADD543002FEAED /* PrivacyInfo.xcprivacy in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BB88D2022BADD549002FEAED /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = AppCenterDistribute.xcframework;
dstSubfolderSpec = 10;
files = (
BB88D2032BADD567002FEAED /* PrivacyInfo.xcprivacy in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
041CFF8D1ECCFFD200B4654B /* Tests macOS.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "Tests macOS.xcconfig"; path = "../../Config/Tests macOS.xcconfig"; sourceTree = "<group>"; };
04237DC023A31617009BB406 /* MSACHttpClientDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSACHttpClientDelegate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1334,7 +1388,6 @@
D55E7083252F5A1000AB994D /* MSACTestSessionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSACTestSessionInfo.h; sourceTree = "<group>"; };
D5812F312423C2FA00C5F5C5 /* MSACUserDefaultsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSACUserDefaultsTests.m; sourceTree = "<group>"; };
D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
D881A6B62AAF4176009644A0 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ../PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
DF5DA1F823A0E55500DE695C /* MSACDispatcherUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSACDispatcherUtil.h; sourceTree = "<group>"; };
DF5DA1FC23A0E57B00DE695C /* MSACDispatcherUtil.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSACDispatcherUtil.m; sourceTree = "<group>"; };
DFCB7FFD2472C1BD0058D292 /* OCHamcrest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OCHamcrest.xcodeproj; path = ../../Vendor/OCHamcrest/Source/OCHamcrest.xcodeproj; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1591,7 +1644,6 @@
isa = PBXGroup;
children = (
D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */,
D881A6B62AAF4176009644A0 /* PrivacyInfo.xcprivacy */,
6E0401051D1C98220051BCFA /* AppCenter */,
6E2395791D22EF4F00E543C8 /* AppCenterTests */,
6E0401041D1C98220051BCFA /* Products */,
Expand Down Expand Up @@ -2529,6 +2581,7 @@
C9A91FB1230C01140068070D /* Headers */,
C9A91FB2230C01140068070D /* Sources */,
C9A91FB3230C01140068070D /* Frameworks */,
D8C05A3F2B7CCED300458569 /* Resources */,
);
buildRules = (
);
Expand All @@ -2547,6 +2600,7 @@
C9A91FFF230C05D70068070D /* Headers */,
C9A92000230C05D70068070D /* Sources */,
C9A92001230C05D70068070D /* Frameworks */,
D8C05A412B7CCEDE00458569 /* Resources */,
);
buildRules = (
);
Expand All @@ -2565,6 +2619,7 @@
C9A9201C230C07A50068070D /* Headers */,
C9A9201D230C07A50068070D /* Sources */,
C9A9201E230C07A50068070D /* Frameworks */,
D8C05A432B7CCEF000458569 /* Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -2764,6 +2819,30 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D8C05A3F2B7CCED300458569 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8C05A402B7CCED700458569 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D8C05A412B7CCEDE00458569 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8C05A422B7CCEE200458569 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
D8C05A432B7CCEF000458569 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8C05A442B7CCEF300458569 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
Expand Down
14 changes: 10 additions & 4 deletions AppCenter/AppCenter/Internals/Context/Device/MSACDeviceTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,21 @@ - (NSString *)screenSize {

#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
- (NSString *)carrierName:(CTCarrier *)carrier {
return [self isValidCarrierName:carrier.carrierName] ? carrier.carrierName : nil;
return [self isCarrierNameValid:carrier.carrierName] ? carrier.carrierName : nil;
}

- (NSString *)carrierCountry:(CTCarrier *)carrier {
return ([carrier.isoCountryCode length] > 0) ? carrier.isoCountryCode : nil;
return [self isCarrierCountyValid:carrier.isoCountryCode] ? carrier.isoCountryCode : nil;
}

- (BOOL)isValidCarrierName:(NSString *)carrier {
return [carrier length] > 0 && [@"carrier" caseInsensitiveCompare:carrier] != NSOrderedSame;
- (BOOL)isCarrierNameValid:(NSString *)carrier {
return [carrier length] > 0 && [@"carrier" caseInsensitiveCompare:carrier] != NSOrderedSame && ![@"--" isEqualToString:carrier];
}

// The CTCarrier is deprecated without replacement since iOS 16 (https://developer.apple.com/documentation/coretelephony/ctcarrier)
// and will always return "--" for isoCountryCode.
- (BOOL)isCarrierCountyValid:(NSString *)country {
return [country length] > 0 && ![@"--" isEqualToString:country];
}

- (CTCarrier *)firstCarrier:(NSDictionary<NSString *, CTCarrier *> *)carriers {
Expand Down
2 changes: 2 additions & 0 deletions AppCenter/AppCenterTests/MSACEncrypterTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,12 @@ - (void)testDecryptLegacyItem {
NSString *clearText = @"Test string";

// Save the key to disk. This must not change as it was used to encrypt the text.
// [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="this is not a secret")]
NSString *currentKey = @"zlIS50zXq7fm2GqassShXrjkMBsdjlTsmIT+d1D3CTI=";
[MSACMockKeychainUtil storeString:currentKey forKey:kMSACEncryptionKeyTagOriginal];

// This cipher text contains no metadata, and no IV was used.
// [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="this is not a secret")]
NSString *cipherText = @"S6uNmq7u0eKGaU2GQPUGMQ==";
MSACEncrypter *encrypter = [MSACEncrypter new];

Expand Down
Loading

0 comments on commit ab54f75

Please sign in to comment.