From 156083770f589d8fecd370edbe90efb8b80d9474 Mon Sep 17 00:00:00 2001 From: Anatoly Pristensky Date: Fri, 8 Sep 2023 12:33:31 +0200 Subject: [PATCH 1/4] Add dataResidencyRegion option for sending to portal (#2495) Co-authored-by: Dmitriy Kirakosyan --- .../Channel/MSACChannelUnitDefault.m | 3 + .../Internals/MSACAppCenterInternal.h | 9 + .../Internals/Model/MSACAbstractLog.m | 10 +- .../Internals/Model/MSACAbstractLogPrivate.h | 1 + AppCenter/AppCenter/MSACAppCenter.h | 6 + AppCenter/AppCenter/MSACAppCenter.m | 10 + AppCenter/AppCenter/Model/MSACLog.h | 5 + .../AppCenterTests/MSACAbstractLogTests.m | 13 + AppCenter/AppCenterTests/MSACAppCenterTests.m | 9 + .../MSACChannelUnitDefaultTests.m | 9 +- .../xcschemes/SasquatchWatchObjC.xcscheme | 2 +- .../xcschemes/SasquatchWatchSwift.xcscheme | 2 +- Sasquatch/Sasquatch/AppCenterDelegate.swift | 1 + .../Sasquatch/Base.lproj/Main.storyboard | 266 +++++++++++------- Sasquatch/Sasquatch/Constants.h | 1 + .../MSMainViewController.swift | 38 +++ .../AppCenterDelegateSwift.swift | 4 + Sasquatch/SasquatchSwift/AppDelegate.swift | 6 + .../SasquatchMac.xcodeproj/project.pbxproj | 4 +- .../SasquatchMac/AppCenterDelegate.swift | 1 + .../Base.lproj/SasquatchMac.storyboard | 157 ++++++----- SasquatchMac/SasquatchMac/Constants.h | 1 + .../AppCenterViewController.swift | 40 ++- .../SasquatchMacObjC/AppCenterDelegateObjC.m | 4 + SasquatchMac/SasquatchMacObjC/AppDelegate.m | 6 + .../AppCenterDelegateSwift.swift | 3 + .../SasquatchMacSwift/AppDelegate.swift | 6 + 27 files changed, 437 insertions(+), 180 deletions(-) diff --git a/AppCenter/AppCenter/Internals/Channel/MSACChannelUnitDefault.m b/AppCenter/AppCenter/Internals/Channel/MSACChannelUnitDefault.m index 78c4650ff1..fada4d12cf 100644 --- a/AppCenter/AppCenter/Internals/Channel/MSACChannelUnitDefault.m +++ b/AppCenter/AppCenter/Internals/Channel/MSACChannelUnitDefault.m @@ -87,6 +87,9 @@ - (void)enqueueItem:(id)item flags:(MSACFlags)flags { if (item && !item.device) { item.device = [[MSACDeviceTracker sharedInstance] device]; } + if (item && !item.dataResidencyRegion) { + item.dataResidencyRegion = [MSACAppCenter dataResidencyRegion]; + } if (!item || ![item isValid]) { MSACLogWarning([MSACAppCenter logTag], @"Log is not valid."); return; diff --git a/AppCenter/AppCenter/Internals/MSACAppCenterInternal.h b/AppCenter/AppCenter/Internals/MSACAppCenterInternal.h index 1e244af8c9..cf458563a4 100644 --- a/AppCenter/AppCenter/Internals/MSACAppCenterInternal.h +++ b/AppCenter/AppCenter/Internals/MSACAppCenterInternal.h @@ -49,6 +49,8 @@ static NSString *const kMSACTrueEnvironmentString = @"1"; @property(atomic, copy) NSString *logUrl; +@property(atomic, copy) NSString *dataResidencyRegion; + @property(nonatomic, readonly) NSUUID *installId; @property(nonatomic) NSNumber *requestedMaxStorageSizeInBytes; @@ -110,6 +112,13 @@ static NSString *const kMSACTrueEnvironmentString = @"1"; */ - (NSString *)logUrl; +/** + * Get the data residency region. + * + * @return data residency region. + */ +- (NSString *)dataResidencyRegion; + /** * Get the app secret. * diff --git a/AppCenter/AppCenter/Internals/Model/MSACAbstractLog.m b/AppCenter/AppCenter/Internals/Model/MSACAbstractLog.m index c775985571..2b3a7dec74 100644 --- a/AppCenter/AppCenter/Internals/Model/MSACAbstractLog.m +++ b/AppCenter/AppCenter/Internals/Model/MSACAbstractLog.m @@ -31,6 +31,7 @@ @implementation MSACAbstractLog @synthesize sid = _sid; @synthesize distributionGroupId = _distributionGroupId; @synthesize userId = _userId; +@synthesize dataResidencyRegion = _dataResidencyRegion; @synthesize device = _device; @synthesize tag = _tag; @@ -62,6 +63,9 @@ - (NSMutableDictionary *)serializeToDictionary { if (self.device) { dict[kMSACDevice] = [self.device serializeToDictionary]; } + if (self.dataResidencyRegion) { + dict[kMSACDataResidencyRegion] = self.dataResidencyRegion; + } return dict; } @@ -80,7 +84,9 @@ - (BOOL)isEqual:(id)object { ((!self.sid && !log.sid) || [self.sid isEqualToString:log.sid]) && ((!self.distributionGroupId && !log.distributionGroupId) || [self.distributionGroupId isEqualToString:log.distributionGroupId]) && ((!self.userId && !log.userId) || [self.userId isEqualToString:log.userId]) && - ((!self.device && !log.device) || [self.device isEqual:log.device]); + ((!self.device && !log.device) || [self.device isEqual:log.device]) && + ((!self.dataResidencyRegion && !log.dataResidencyRegion) || [self.dataResidencyRegion isEqualToString:log.dataResidencyRegion]); + } #pragma mark - NSCoding @@ -98,6 +104,7 @@ - (instancetype)initWithCoder:(NSCoder *)coder { _distributionGroupId = [coder decodeObjectForKey:kMSACDistributionGroupId]; _userId = [coder decodeObjectForKey:kMSACUserId]; _device = [coder decodeObjectForKey:kMSACDevice]; + _dataResidencyRegion = [coder decodeObjectForKey:kMSACDataResidencyRegion]; } return self; } @@ -109,6 +116,7 @@ - (void)encodeWithCoder:(NSCoder *)coder { [coder encodeObject:self.distributionGroupId forKey:kMSACDistributionGroupId]; [coder encodeObject:self.userId forKey:kMSACUserId]; [coder encodeObject:self.device forKey:kMSACDevice]; + [coder encodeObject:self.dataResidencyRegion forKey:kMSACDataResidencyRegion]; } #pragma mark - Utility diff --git a/AppCenter/AppCenter/Internals/Model/MSACAbstractLogPrivate.h b/AppCenter/AppCenter/Internals/Model/MSACAbstractLogPrivate.h index c9e4db59dd..76a36891d9 100644 --- a/AppCenter/AppCenter/Internals/Model/MSACAbstractLogPrivate.h +++ b/AppCenter/AppCenter/Internals/Model/MSACAbstractLogPrivate.h @@ -3,6 +3,7 @@ #import +static NSString *const kMSACDataResidencyRegion = @"dataResidencyRegion"; static NSString *const kMSACDevice = @"device"; static NSString *const kMSACDistributionGroupId = @"distributionGroupId"; static NSString *const kMSACSId = @"sid"; diff --git a/AppCenter/AppCenter/MSACAppCenter.h b/AppCenter/AppCenter/MSACAppCenter.h index 6a9ee14ba6..77cb0cc432 100644 --- a/AppCenter/AppCenter/MSACAppCenter.h +++ b/AppCenter/AppCenter/MSACAppCenter.h @@ -109,6 +109,12 @@ NS_SWIFT_NAME(AppCenter) */ @property(class, nonatomic, strong) NSString *logUrl; +/** + * Data residency region. + * Verify list of supported regions on . Value outside of supported range is treated by backend as ANY. + */ +@property(class, nonatomic, strong) NSString *dataResidencyRegion; + /** * Set log handler. */ diff --git a/AppCenter/AppCenter/MSACAppCenter.m b/AppCenter/AppCenter/MSACAppCenter.m index 00877b1cbc..d706955a65 100644 --- a/AppCenter/AppCenter/MSACAppCenter.m +++ b/AppCenter/AppCenter/MSACAppCenter.m @@ -56,6 +56,8 @@ @implementation MSACAppCenter @synthesize logUrl = _logUrl; +@synthesize dataResidencyRegion = _dataResidencyRegion; + + (instancetype)sharedInstance { dispatch_once(&onceToken, ^{ if (sharedInstance == nil) { @@ -246,6 +248,10 @@ + (NSString *)groupId { return kMSACGroupId; } ++ (NSString *)dataResidencyRegion { + return [[MSACAppCenter sharedInstance] dataResidencyRegion]; +} + + (void)setMaxStorageSize:(long)sizeInBytes completionHandler:(void (^)(BOOL))completionHandler { [[MSACAppCenter sharedInstance] setMaxStorageSize:sizeInBytes completionHandler:completionHandler]; } @@ -254,6 +260,10 @@ + (void)setUserId:(NSString *)userId { [[MSACAppCenter sharedInstance] setUserId:userId]; } ++ (void)setDataResidencyRegion:(NSString *)dataResidencyRegion { + [[MSACAppCenter sharedInstance] setDataResidencyRegion:dataResidencyRegion]; +} + + (void)setCountryCode:(NSString *)countryCode { [[MSACDeviceTracker sharedInstance] setCountryCode:countryCode]; } diff --git a/AppCenter/AppCenter/Model/MSACLog.h b/AppCenter/AppCenter/Model/MSACLog.h index d46b377fd1..cd946cd548 100644 --- a/AppCenter/AppCenter/Model/MSACLog.h +++ b/AppCenter/AppCenter/Model/MSACLog.h @@ -32,6 +32,11 @@ NS_SWIFT_NAME(Log) */ @property(nonatomic, copy) NSString *distributionGroupId; +/** + * Data residency region. + */ +@property(nonatomic, copy) NSString *dataResidencyRegion; + /** * Optional user identifier. */ diff --git a/AppCenter/AppCenterTests/MSACAbstractLogTests.m b/AppCenter/AppCenterTests/MSACAbstractLogTests.m index d50d04d2aa..5389adae3d 100644 --- a/AppCenter/AppCenterTests/MSACAbstractLogTests.m +++ b/AppCenter/AppCenterTests/MSACAbstractLogTests.m @@ -33,6 +33,7 @@ - (void)setUp { self.sut.timestamp = [NSDate dateWithTimeIntervalSince1970:0]; self.sut.sid = @"FAKE-SESSION-ID"; self.sut.distributionGroupId = @"FAKE-GROUP-ID"; + self.sut.dataResidencyRegion = @"FAKE-DATA-RESIDENCY-REGION"; self.sut.userId = @"FAKE-USER-ID"; self.sut.device = OCMPartialMock([MSACDevice new]); @@ -57,6 +58,7 @@ - (void)testSerializingToDictionaryWorks { assertThat(actual[@"timestamp"], equalTo(@"1970-01-01T00:00:00.000Z")); assertThat(actual[@"sid"], equalTo(@"FAKE-SESSION-ID")); assertThat(actual[@"distributionGroupId"], equalTo(@"FAKE-GROUP-ID")); + assertThat(actual[@"dataResidencyRegion"], equalTo(@"FAKE-DATA-RESIDENCY-REGION")); assertThat(actual[@"userId"], equalTo(@"FAKE-USER-ID")); assertThat(actual[@"device"], equalTo(@{})); } @@ -76,6 +78,7 @@ - (void)testNSCodingSerializationAndDeserializationWorks { assertThat(actualLog.timestamp, equalTo(self.sut.timestamp)); assertThat(actualLog.sid, equalTo(self.sut.sid)); assertThat(actualLog.distributionGroupId, equalTo(self.sut.distributionGroupId)); + assertThat(actualLog.dataResidencyRegion, equalTo(self.sut.dataResidencyRegion)); assertThat(actualLog.userId, equalTo(self.sut.userId)); assertThat(actualLog.device, equalTo(self.sut.device)); } @@ -126,6 +129,7 @@ - (void)testIsEqual { log.timestamp = self.sut.timestamp; log.sid = self.sut.sid; log.distributionGroupId = self.sut.distributionGroupId; + log.dataResidencyRegion = self.sut.dataResidencyRegion; log.userId = self.sut.userId; log.device = self.sut.device; log.tag = self.sut.tag; @@ -159,6 +163,14 @@ - (void)testIsEqual { // Then XCTAssertFalse([self.sut isEqual:log]); + + // When + self.sut.userId = @"FAKE-USER-ID"; + self.sut.dataResidencyRegion = @"FAKE-NEW-DATA-RESIDENCY-REGION"; + + // Then + XCTAssertFalse([self.sut isEqual:log]); + } - (void)testSerializingToJsonWorks { @@ -174,6 +186,7 @@ - (void)testSerializingToJsonWorks { assertThat([actualDict objectForKey:@"timestamp"], equalTo(@"1970-01-01T00:00:00.000Z")); assertThat([actualDict objectForKey:@"sid"], equalTo(@"FAKE-SESSION-ID")); assertThat([actualDict objectForKey:@"distributionGroupId"], equalTo(@"FAKE-GROUP-ID")); + assertThat([actualDict objectForKey:@"dataResidencyRegion"], equalTo(@"FAKE-DATA-RESIDENCY-REGION")); assertThat([actualDict objectForKey:@"userId"], equalTo(@"FAKE-USER-ID")); assertThat([actualDict objectForKey:@"device"], equalTo(@{})); } diff --git a/AppCenter/AppCenterTests/MSACAppCenterTests.m b/AppCenter/AppCenterTests/MSACAppCenterTests.m index fc09daeeae..2b5b9f900a 100644 --- a/AppCenter/AppCenterTests/MSACAppCenterTests.m +++ b/AppCenter/AppCenterTests/MSACAppCenterTests.m @@ -1065,4 +1065,13 @@ - (void)testDisableNetworkRequestsAfterStart { XCTAssertEqual(tokenObject, self.channelGroupMock); } +- (void)testSetDataResidencyRegion { + // If + NSString *expectedDataResidencyRegion = @"rg"; + [MSACAppCenter setDataResidencyRegion:expectedDataResidencyRegion]; + + // Then + XCTAssertEqualObjects(expectedDataResidencyRegion, [MSACAppCenter dataResidencyRegion]); +} + @end diff --git a/AppCenter/AppCenterTests/MSACChannelUnitDefaultTests.m b/AppCenter/AppCenterTests/MSACChannelUnitDefaultTests.m index eb96d9feba..f47ea76b7d 100644 --- a/AppCenter/AppCenterTests/MSACChannelUnitDefaultTests.m +++ b/AppCenter/AppCenterTests/MSACChannelUnitDefaultTests.m @@ -1393,14 +1393,16 @@ - (void)testDelegateAfterChannelResumed { }]; } -- (void)testDeviceAndTimestampAreAddedOnEnqueuing { +- (void)testDeviceAndTimestampAndDataResidencyRegionAreAddedOnEnqueuing { // If MSACChannelUnitDefault *channel = [self createChannelUnitDefault]; id mockLog = [self getValidMockLog]; mockLog.device = nil; mockLog.timestamp = nil; + mockLog.dataResidencyRegion = nil; [self initChannelEndJobExpectation]; + [MSACAppCenter setDataResidencyRegion:@"RG1"]; // When [channel enqueueItem:mockLog flags:MSACFlagsDefault]; @@ -1408,6 +1410,7 @@ - (void)testDeviceAndTimestampAreAddedOnEnqueuing { // Then XCTAssertNotNil(mockLog.device); XCTAssertNotNil(mockLog.timestamp); + XCTAssertNotNil(mockLog.dataResidencyRegion); [self enqueueChannelEndJobExpectation]; [self waitForExpectationsWithTimeout:kMSACTestTimeout handler:^(NSError *error) { @@ -1417,13 +1420,14 @@ - (void)testDeviceAndTimestampAreAddedOnEnqueuing { }]; } -- (void)testDeviceAndTimestampAreNotOverwrittenOnEnqueuing { +- (void)testDeviceAndTimestampAndDataResidencyRegionAreNotOverwrittenOnEnqueuing { // If MSACChannelUnitDefault *channel = [self createChannelUnitDefault]; id mockLog = [self getValidMockLog]; MSACDevice *device = mockLog.device = [MSACDevice new]; NSDate *timestamp = mockLog.timestamp = [NSDate new]; + NSString *dataResidencyRegion = mockLog.dataResidencyRegion = @"RG1"; [self initChannelEndJobExpectation]; // When @@ -1432,6 +1436,7 @@ - (void)testDeviceAndTimestampAreNotOverwrittenOnEnqueuing { // Then XCTAssertEqual(mockLog.device, device); XCTAssertEqual(mockLog.timestamp, timestamp); + XCTAssertEqual(mockLog.dataResidencyRegion, dataResidencyRegion); [self enqueueChannelEndJobExpectation]; [self waitForExpectationsWithTimeout:kMSACTestTimeout handler:^(NSError *error) { diff --git a/Sasquatch/Sasquatch.xcodeproj/xcshareddata/xcschemes/SasquatchWatchObjC.xcscheme b/Sasquatch/Sasquatch.xcodeproj/xcshareddata/xcschemes/SasquatchWatchObjC.xcscheme index a8f6dec367..2ca0a396e9 100644 --- a/Sasquatch/Sasquatch.xcodeproj/xcshareddata/xcschemes/SasquatchWatchObjC.xcscheme +++ b/Sasquatch/Sasquatch.xcodeproj/xcshareddata/xcschemes/SasquatchWatchObjC.xcscheme @@ -124,4 +124,4 @@ buildConfiguration = "Release" revealArchiveInOrganizer = "YES"> - + \ No newline at end of file diff --git a/Sasquatch/Sasquatch.xcodeproj/xcshareddata/xcschemes/SasquatchWatchSwift.xcscheme b/Sasquatch/Sasquatch.xcodeproj/xcshareddata/xcschemes/SasquatchWatchSwift.xcscheme index b0edbaf348..8757db8eff 100644 --- a/Sasquatch/Sasquatch.xcodeproj/xcshareddata/xcschemes/SasquatchWatchSwift.xcscheme +++ b/Sasquatch/Sasquatch.xcodeproj/xcshareddata/xcschemes/SasquatchWatchSwift.xcscheme @@ -125,4 +125,4 @@ buildConfiguration = "Release" revealArchiveInOrganizer = "YES"> - + \ No newline at end of file diff --git a/Sasquatch/Sasquatch/AppCenterDelegate.swift b/Sasquatch/Sasquatch/AppCenterDelegate.swift index cc300101c8..4314d9fbcd 100644 --- a/Sasquatch/Sasquatch/AppCenterDelegate.swift +++ b/Sasquatch/Sasquatch/AppCenterDelegate.swift @@ -23,6 +23,7 @@ import AppCenterCrashes func isDebuggerAttached() -> Bool func startAnalyticsFromLibrary() func setUserId(_ userId: String?) + func setDataResidencyRegion(_ dataResidencyRegion: String?) func setLogUrl(_ logUrl: String?) func setCountryCode(_ countryCode: String?) func isNetworkRequestsAllowed() -> Bool diff --git a/Sasquatch/Sasquatch/Base.lproj/Main.storyboard b/Sasquatch/Sasquatch/Base.lproj/Main.storyboard index a327cc6c95..f04c1c3c51 100644 --- a/Sasquatch/Sasquatch/Base.lproj/Main.storyboard +++ b/Sasquatch/Sasquatch/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -19,7 +19,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -86,14 +86,14 @@ - + - + - + @@ -137,7 +137,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -210,7 +210,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -244,7 +244,7 @@ - + @@ -270,7 +270,7 @@ - + @@ -292,13 +292,13 @@ - + - - + @@ -373,7 +373,7 @@ - + @@ -390,7 +390,7 @@ - + @@ -407,7 +407,7 @@ - + @@ -434,7 +434,7 @@ - + @@ -461,7 +461,7 @@ - + @@ -509,7 +509,7 @@ - + @@ -535,7 +535,7 @@ - + @@ -561,7 +561,7 @@ - + @@ -585,7 +585,7 @@ - + @@ -614,7 +614,7 @@ - + @@ -654,7 +654,7 @@ - + @@ -705,7 +705,7 @@ - + @@ -732,7 +732,7 @@ - + @@ -759,7 +759,7 @@ - + @@ -776,7 +776,7 @@ - + @@ -803,7 +803,7 @@ - + @@ -820,7 +820,7 @@ - + @@ -837,7 +837,7 @@ - + @@ -895,7 +895,7 @@ - + @@ -922,7 +922,7 @@ - + @@ -949,7 +949,7 @@ - + @@ -979,7 +979,7 @@ - + @@ -1007,7 +1007,7 @@ - + @@ -1031,7 +1031,7 @@ - + @@ -1056,7 +1056,7 @@ - + @@ -1080,7 +1080,7 @@ - + @@ -1105,7 +1105,7 @@ - + @@ -1134,19 +1134,19 @@ - + - - + @@ -1180,15 +1180,22 @@ - - + + - - + + - - - - - - + + - - + + - - + + + - + - - + - - + - - + - + + + + + + + @@ -1333,6 +1379,7 @@ + @@ -1341,6 +1388,7 @@ + @@ -1383,7 +1431,7 @@ - + @@ -1406,7 +1454,7 @@ - + @@ -1429,7 +1477,7 @@ - + @@ -1481,7 +1529,7 @@ - + @@ -1505,7 +1553,7 @@ - + @@ -1529,7 +1577,7 @@ - + @@ -1557,7 +1605,7 @@ - + @@ -1581,7 +1629,7 @@ - + @@ -1605,14 +1653,14 @@ - + - + @@ -1657,7 +1705,7 @@ - + @@ -1736,14 +1784,14 @@ - + @@ -1759,13 +1807,13 @@ - + - + - + @@ -1799,7 +1847,7 @@ - + @@ -1809,7 +1857,7 @@ - - - + + @@ -915,16 +924,16 @@ - - + + - - + + @@ -932,7 +941,7 @@ - - + - + + + + + + + + + @@ -1076,6 +1105,7 @@ + @@ -1083,6 +1113,7 @@ + @@ -1097,7 +1128,7 @@ - + @@ -1117,7 +1148,7 @@ - + @@ -1129,13 +1160,13 @@ - + - + - + @@ -1158,7 +1189,7 @@ - + @@ -1223,7 +1254,7 @@ - + @@ -1235,12 +1266,12 @@ - - + + - + @@ -1283,7 +1314,7 @@ - - + + diff --git a/SasquatchMac/SasquatchMac/Constants.h b/SasquatchMac/SasquatchMac/Constants.h index 16c113b2fc..ec381749f2 100644 --- a/SasquatchMac/SasquatchMac/Constants.h +++ b/SasquatchMac/SasquatchMac/Constants.h @@ -5,6 +5,7 @@ static NSString *const kMSMainStoryboardName = @"SasquatchMac"; static NSString *const kMSUserIdKey = @"userId"; +static NSString *const kMSACDataResidencyRegion = @"kMSACDataResidencyRegion"; static NSString *const kMSLogUrl = @"logUrl"; static NSString *const kMSAppSecret = @"appSecret"; static NSString *const kMSLogTag = @"[SasquatchMac]"; diff --git a/SasquatchMac/SasquatchMac/ViewControllers/AppCenterViewController.swift b/SasquatchMac/SasquatchMac/ViewControllers/AppCenterViewController.swift index 1e7fea8628..49f7cd6591 100755 --- a/SasquatchMac/SasquatchMac/ViewControllers/AppCenterViewController.swift +++ b/SasquatchMac/SasquatchMac/ViewControllers/AppCenterViewController.swift @@ -29,7 +29,8 @@ class AppCenterViewController : NSViewController, NSTextFieldDelegate, NSTextVie @IBOutlet var userIdLabel : NSTextField? @IBOutlet var setEnabledButton : NSButton? @IBOutlet var networkRequestsAllowed: NSButton? - + @IBOutlet weak var dataResidencyRegionLabel: NSTextField! + @IBOutlet weak var deviceIdField: NSTextField! @IBOutlet weak var startupModeField: NSComboBox! @IBOutlet weak var storageMaxSizeField: NSTextField! @@ -38,6 +39,7 @@ class AppCenterViewController : NSViewController, NSTextFieldDelegate, NSTextVie @IBOutlet weak var signOutButton: NSButton! @IBOutlet weak var overrideCountryCodeButton: NSButton! + @IBOutlet weak var setDataResidencyRegionButton: NSButton! @IBOutlet weak var setLogURLButton: NSButton! @IBOutlet weak var setAppSecretButton: NSButton! @IBOutlet weak var setUserIDButton: NSButton! @@ -63,6 +65,7 @@ class AppCenterViewController : NSViewController, NSTextFieldDelegate, NSTextVie appSecretLabel?.stringValue = UserDefaults.standard.string(forKey: kMSAppSecret) ?? appCenter.appSecret() logURLLabel?.stringValue = (UserDefaults.standard.object(forKey: kMSLogUrl) ?? prodLogUrl()) as! String userIdLabel?.stringValue = showUserId() + dataResidencyRegionLabel?.stringValue = showDataResidencyRegion() setEnabledButton?.state = appCenter.isAppCenterEnabled() ? .on : .off networkRequestsAllowed?.state = appCenter.isNetworkRequestsAllowed() ? .on : .off @@ -250,6 +253,33 @@ class AppCenterViewController : NSViewController, NSTextFieldDelegate, NSTextVie } userIdLabel?.stringValue = showUserId() } + + @IBAction func setDataResidencyRegion(_ sender: NSButton) { + let alert: NSAlert = NSAlert() + alert.messageText = "Data Residency Region" + alert.addButton(withTitle: "Save") + alert.addButton(withTitle: "Reset") + alert.addButton(withTitle: "Cancel") + let textField: NSTextField = NSTextField(frame: NSRect(x: 0, y: 0, width: 200, height: 25)) + textField.stringValue = UserDefaults.standard.string(forKey: kMSACDataResidencyRegion) ?? "" + alert.accessoryView = textField + alert.alertStyle = .warning + switch(alert.runModal()) { + case .alertFirstButtonReturn: + let text = textField.stringValue + UserDefaults.standard.set(text, forKey: kMSACDataResidencyRegion) + appCenter.setDataResidencyRegion(text) + break + case .alertSecondButtonReturn: + UserDefaults.standard.removeObject(forKey: kMSACDataResidencyRegion) + appCenter.setDataResidencyRegion(nil) + break + default: + break + } + dataResidencyRegionLabel?.stringValue = showDataResidencyRegion() + } + private func prodLogUrl() -> String { switch startUpModeForCurrentSession { @@ -269,4 +299,12 @@ class AppCenterViewController : NSViewController, NSTextFieldDelegate, NSTextVie } return userId } + + func showDataResidencyRegion() -> String { + let dataResidencyRegion = UserDefaults.standard.string(forKey: kMSACDataResidencyRegion) ?? "Unset" + if (dataResidencyRegion.isEmpty) { + return "Empty string" + } + return dataResidencyRegion + } } diff --git a/SasquatchMac/SasquatchMacObjC/AppCenterDelegateObjC.m b/SasquatchMac/SasquatchMacObjC/AppCenterDelegateObjC.m index 380a0023ed..9c2f957728 100644 --- a/SasquatchMac/SasquatchMacObjC/AppCenterDelegateObjC.m +++ b/SasquatchMac/SasquatchMacObjC/AppCenterDelegateObjC.m @@ -48,6 +48,10 @@ - (void)setUserId:(NSString *)userId { [MSACAppCenter setUserId:userId]; } +- (void)setDataResidencyRegion:(NSString *)dataResidencyRegion { + [MSACAppCenter setDataResidencyRegion:dataResidencyRegion]; +} + - (void)setLogUrl:(NSString *)logUrl { [MSACAppCenter setLogUrl:logUrl]; } diff --git a/SasquatchMac/SasquatchMacObjC/AppDelegate.m b/SasquatchMac/SasquatchMacObjC/AppDelegate.m index f225288ac8..8e4574a062 100644 --- a/SasquatchMac/SasquatchMacObjC/AppDelegate.m +++ b/SasquatchMac/SasquatchMacObjC/AppDelegate.m @@ -92,6 +92,12 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification { [MSACAppCenter setUserId:userId]; } + // Set data residency region. + NSString *dataResidencyRegion = [[NSUserDefaults standardUserDefaults] objectForKey:kMSACDataResidencyRegion]; + if (dataResidencyRegion) { + [MSACAppCenter setDataResidencyRegion:dataResidencyRegion]; + } + [AppCenterProvider shared].appCenter = [[AppCenterDelegateObjC alloc] init]; [self initUI]; [self overrideCountryCode]; diff --git a/SasquatchMac/SasquatchMacSwift/AppCenterDelegateSwift.swift b/SasquatchMac/SasquatchMacSwift/AppCenterDelegateSwift.swift index 0a8f9b6b09..093fe931be 100644 --- a/SasquatchMac/SasquatchMacSwift/AppCenterDelegateSwift.swift +++ b/SasquatchMac/SasquatchMacSwift/AppCenterDelegateSwift.swift @@ -35,6 +35,9 @@ class AppCenterDelegateSwift : AppCenterDelegate { func setUserId(_ userId: String?) { AppCenter.userId = userId; } + func setDataResidencyRegion(_ dataResidencyRegion: String?) { + AppCenter.dataResidencyRegion = dataResidencyRegion; + } func setLogUrl(_ logUrl: String?) { AppCenter.logUrl = logUrl; } diff --git a/SasquatchMac/SasquatchMacSwift/AppDelegate.swift b/SasquatchMac/SasquatchMacSwift/AppDelegate.swift index f75330a215..950e9e722b 100755 --- a/SasquatchMac/SasquatchMacSwift/AppDelegate.swift +++ b/SasquatchMac/SasquatchMacSwift/AppDelegate.swift @@ -121,6 +121,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, CrashesDelegate, CLLocationM if userId != nil { AppCenter.userId = userId } + + // Set data residency region. + let dataResidencyRegion = UserDefaults.standard.string(forKey: kMSACDataResidencyRegion) + if dataResidencyRegion != nil { + AppCenter.dataResidencyRegion = dataResidencyRegion + } AppCenterProvider.shared().appCenter = AppCenterDelegateSwift() From 0265e92561f45da47e110705394a142dfb81132f Mon Sep 17 00:00:00 2001 From: Anatoly Pristensky Date: Fri, 8 Sep 2023 14:34:35 +0200 Subject: [PATCH 2/4] Bump version to 5.0.4 (#2499) --- AppCenter.podspec | 2 +- Config/Version.xcconfig | 2 +- Documentation/iOS/AppCenter/.jazzy.yaml | 2 +- Documentation/iOS/AppCenterAnalytics/.jazzy.yaml | 2 +- Documentation/iOS/AppCenterCrashes/.jazzy.yaml | 2 +- Documentation/iOS/AppCenterDistribute/.jazzy.yaml | 2 +- Documentation/macOS/AppCenter/.jazzy.yaml | 2 +- Documentation/macOS/AppCenterAnalytics/.jazzy.yaml | 2 +- Documentation/macOS/AppCenterCrashes/.jazzy.yaml | 2 +- Documentation/tvOS/AppCenter/.jazzy.yaml | 2 +- Documentation/tvOS/AppCenterAnalytics/.jazzy.yaml | 2 +- Documentation/tvOS/AppCenterCrashes/.jazzy.yaml | 2 +- Package.swift | 2 +- Package@swift-5.3.swift | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/AppCenter.podspec b/AppCenter.podspec index eeade061a9..cf6845e0bf 100644 --- a/AppCenter.podspec +++ b/AppCenter.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.cocoapods_version = '>= 1.10' s.name = 'AppCenter' - s.version = '5.0.3' + s.version = '5.0.4' s.summary = 'Visual Studio App Center is your continuous integration, delivery and learning solution for iOS and macOS apps.' s.description = <<-DESC diff --git a/Config/Version.xcconfig b/Config/Version.xcconfig index e9bba314ec..5362b78db2 100644 --- a/Config/Version.xcconfig +++ b/Config/Version.xcconfig @@ -1,2 +1,2 @@ BUILD_NUMBER = 1 -VERSION_STRING = 5.0.3 +VERSION_STRING = 5.0.4 diff --git a/Documentation/iOS/AppCenter/.jazzy.yaml b/Documentation/iOS/AppCenter/.jazzy.yaml index 4e3bc939fc..9e6cbc684f 100644 --- a/Documentation/iOS/AppCenter/.jazzy.yaml +++ b/Documentation/iOS/AppCenter/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../../Themes/apple module: AppCenter -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/iOS/AppCenterAnalytics/.jazzy.yaml b/Documentation/iOS/AppCenterAnalytics/.jazzy.yaml index cc0cca3493..f16084390c 100644 --- a/Documentation/iOS/AppCenterAnalytics/.jazzy.yaml +++ b/Documentation/iOS/AppCenterAnalytics/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../../Themes/apple module: AppCenterAnalytics -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/iOS/AppCenterCrashes/.jazzy.yaml b/Documentation/iOS/AppCenterCrashes/.jazzy.yaml index 39b5e32ef8..084c7f3592 100644 --- a/Documentation/iOS/AppCenterCrashes/.jazzy.yaml +++ b/Documentation/iOS/AppCenterCrashes/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../../Themes/apple module: AppCenterCrashes -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/iOS/AppCenterDistribute/.jazzy.yaml b/Documentation/iOS/AppCenterDistribute/.jazzy.yaml index f4a711e83d..ca6a3db4fb 100644 --- a/Documentation/iOS/AppCenterDistribute/.jazzy.yaml +++ b/Documentation/iOS/AppCenterDistribute/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../../Themes/apple module: AppCenterDistribute -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/macOS/AppCenter/.jazzy.yaml b/Documentation/macOS/AppCenter/.jazzy.yaml index f2f0f853a3..7bc5b06c6f 100644 --- a/Documentation/macOS/AppCenter/.jazzy.yaml +++ b/Documentation/macOS/AppCenter/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: macosx theme: ../../Themes/apple module: AppCenter -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/macOS/AppCenterAnalytics/.jazzy.yaml b/Documentation/macOS/AppCenterAnalytics/.jazzy.yaml index 3123d92d70..7205da7dd8 100644 --- a/Documentation/macOS/AppCenterAnalytics/.jazzy.yaml +++ b/Documentation/macOS/AppCenterAnalytics/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: macosx theme: ../../Themes/apple module: AppCenterAnalytics -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/macOS/AppCenterCrashes/.jazzy.yaml b/Documentation/macOS/AppCenterCrashes/.jazzy.yaml index a102f30680..6f8b87712a 100644 --- a/Documentation/macOS/AppCenterCrashes/.jazzy.yaml +++ b/Documentation/macOS/AppCenterCrashes/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: macosx theme: ../../Themes/apple module: AppCenterCrashes -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/tvOS/AppCenter/.jazzy.yaml b/Documentation/tvOS/AppCenter/.jazzy.yaml index c98ca1d26e..0a7d67e330 100644 --- a/Documentation/tvOS/AppCenter/.jazzy.yaml +++ b/Documentation/tvOS/AppCenter/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: appletvsimulator theme: ../../Themes/apple module: AppCenter -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/tvOS/AppCenterAnalytics/.jazzy.yaml b/Documentation/tvOS/AppCenterAnalytics/.jazzy.yaml index 406d66acc7..186b1b3c4e 100644 --- a/Documentation/tvOS/AppCenterAnalytics/.jazzy.yaml +++ b/Documentation/tvOS/AppCenterAnalytics/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: appletvsimulator theme: ../../Themes/apple module: AppCenterAnalytics -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/tvOS/AppCenterCrashes/.jazzy.yaml b/Documentation/tvOS/AppCenterCrashes/.jazzy.yaml index 9c6f00b6c4..b3e46cb30c 100644 --- a/Documentation/tvOS/AppCenterCrashes/.jazzy.yaml +++ b/Documentation/tvOS/AppCenterCrashes/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: appletvsimulator theme: ../../Themes/apple module: AppCenterCrashes -module_version: 5.0.3 +module_version: 5.0.4 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Package.swift b/Package.swift index 39dc3bc012..83f291e400 100644 --- a/Package.swift +++ b/Package.swift @@ -77,7 +77,7 @@ let package = Package( exclude: ["Support"], cSettings: { var settings: [CSetting] = [ - .define("APP_CENTER_C_VERSION", to:"\"5.0.3\""), + .define("APP_CENTER_C_VERSION", to:"\"5.0.4\""), .define("APP_CENTER_C_BUILD", to: "\"1\"") ] settings.append(contentsOf: cHeaderSearchPaths) diff --git a/Package@swift-5.3.swift b/Package@swift-5.3.swift index dbd9f3f584..b34fe6fb1a 100644 --- a/Package@swift-5.3.swift +++ b/Package@swift-5.3.swift @@ -80,7 +80,7 @@ let package = Package( exclude: ["Support"], cSettings: { var settings: [CSetting] = [ - .define("APP_CENTER_C_VERSION", to:"\"5.0.3\""), + .define("APP_CENTER_C_VERSION", to:"\"5.0.4\""), .define("APP_CENTER_C_BUILD", to: "\"1\"") ] settings.append(contentsOf: cHeaderSearchPaths) From a33e0860244d12dc5202efbdc50799a178c7392a Mon Sep 17 00:00:00 2001 From: Anatoly Pristensky Date: Thu, 14 Sep 2023 11:43:12 +0200 Subject: [PATCH 3/4] Update App Center SDK to include privacy manifest (#2501) --- AppCenter/AppCenter.xcodeproj/project.pbxproj | 4 + AppCenter/PrivacyInfo.xcprivacy | 86 +++++++++++++++++++ .../project.pbxproj | 2 + AppCenterAnalytics/PrivacyInfo.xcprivacy | 86 +++++++++++++++++++ .../project.pbxproj | 2 + AppCenterCrashes/PrivacyInfo.xcprivacy | 86 +++++++++++++++++++ .../project.pbxproj | 2 + AppCenterDistribute/PrivacyInfo.xcprivacy | 86 +++++++++++++++++++ CHANGELOG.md | 5 ++ 9 files changed, 359 insertions(+) create mode 100644 AppCenter/PrivacyInfo.xcprivacy create mode 100644 AppCenterAnalytics/PrivacyInfo.xcprivacy create mode 100644 AppCenterCrashes/PrivacyInfo.xcprivacy create mode 100644 AppCenterDistribute/PrivacyInfo.xcprivacy diff --git a/AppCenter/AppCenter.xcodeproj/project.pbxproj b/AppCenter/AppCenter.xcodeproj/project.pbxproj index dee513dca2..b93af2f3e2 100644 --- a/AppCenter/AppCenter.xcodeproj/project.pbxproj +++ b/AppCenter/AppCenter.xcodeproj/project.pbxproj @@ -1333,6 +1333,8 @@ D55E7082252F5A1000AB994D /* MSACTestSessionInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSACTestSessionInfo.m; sourceTree = ""; }; D55E7083252F5A1000AB994D /* MSACTestSessionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSACTestSessionInfo.h; sourceTree = ""; }; D5812F312423C2FA00C5F5C5 /* MSACUserDefaultsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSACUserDefaultsTests.m; sourceTree = ""; }; + D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + D881A6B62AAF4176009644A0 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ../PrivacyInfo.xcprivacy; sourceTree = ""; }; DF5DA1F823A0E55500DE695C /* MSACDispatcherUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSACDispatcherUtil.h; sourceTree = ""; }; DF5DA1FC23A0E57B00DE695C /* MSACDispatcherUtil.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSACDispatcherUtil.m; sourceTree = ""; }; DFCB7FFD2472C1BD0058D292 /* OCHamcrest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OCHamcrest.xcodeproj; path = ../../Vendor/OCHamcrest/Source/OCHamcrest.xcodeproj; sourceTree = ""; }; @@ -1588,6 +1590,8 @@ 6E0400FA1D1C98220051BCFA = { isa = PBXGroup; children = ( + D80EC5002AB0713B000C82D7 /* PrivacyInfo.xcprivacy */, + D881A6B62AAF4176009644A0 /* PrivacyInfo.xcprivacy */, 6E0401051D1C98220051BCFA /* AppCenter */, 6E2395791D22EF4F00E543C8 /* AppCenterTests */, 6E0401041D1C98220051BCFA /* Products */, diff --git a/AppCenter/PrivacyInfo.xcprivacy b/AppCenter/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..e2e2a1315e --- /dev/null +++ b/AppCenter/PrivacyInfo.xcprivacy @@ -0,0 +1,86 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeDeviceID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePhotosorVideos + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeCrashData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePerformanceData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDiagnosticData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + + + + diff --git a/AppCenterAnalytics/AppCenterAnalytics.xcodeproj/project.pbxproj b/AppCenterAnalytics/AppCenterAnalytics.xcodeproj/project.pbxproj index 91af8054da..2fcc1ac50c 100644 --- a/AppCenterAnalytics/AppCenterAnalytics.xcodeproj/project.pbxproj +++ b/AppCenterAnalytics/AppCenterAnalytics.xcodeproj/project.pbxproj @@ -573,6 +573,7 @@ C9EBAB18230D724700A20F0F /* AppCenter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppCenter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C9EBAB28230D72F300A20F0F /* AppCenter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppCenter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C9EBAB2A230D72F900A20F0F /* AppCenter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppCenter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D80EC5092AB07A0E000C82D7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; DFCB80232472D5D70058D292 /* OCHamcrest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OCHamcrest.xcodeproj; path = ../../Vendor/OCHamcrest/Source/OCHamcrest.xcodeproj; sourceTree = ""; }; E758FA7B20FFDEE700011793 /* MSACPropertyConfigurator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSACPropertyConfigurator.h; sourceTree = ""; }; E758FA7C20FFDEE700011793 /* MSACPropertyConfigurator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSACPropertyConfigurator.m; sourceTree = ""; }; @@ -795,6 +796,7 @@ E85547B71D2D6253002DF6E2 = { isa = PBXGroup; children = ( + D80EC5092AB07A0E000C82D7 /* PrivacyInfo.xcprivacy */, E85547C21D2D6253002DF6E2 /* AppCenterAnalytics */, E85547D61D2D6723002DF6E2 /* AppCenterAnalyticsTests */, E85547C11D2D6253002DF6E2 /* Products */, diff --git a/AppCenterAnalytics/PrivacyInfo.xcprivacy b/AppCenterAnalytics/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..e2e2a1315e --- /dev/null +++ b/AppCenterAnalytics/PrivacyInfo.xcprivacy @@ -0,0 +1,86 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeDeviceID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePhotosorVideos + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeCrashData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePerformanceData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDiagnosticData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + + + + diff --git a/AppCenterCrashes/AppCenterCrashes.xcodeproj/project.pbxproj b/AppCenterCrashes/AppCenterCrashes.xcodeproj/project.pbxproj index 7f6954e7e9..00f2629f89 100644 --- a/AppCenterCrashes/AppCenterCrashes.xcodeproj/project.pbxproj +++ b/AppCenterCrashes/AppCenterCrashes.xcodeproj/project.pbxproj @@ -928,6 +928,7 @@ C9EBAB2E230D736A00A20F0F /* AppCenter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppCenter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C9EBAB30230D736F00A20F0F /* AppCenter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppCenter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D55737BD254AB33F00B64478 /* AppCenter.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AppCenter.xcodeproj; path = ../../AppCenter/AppCenter.xcodeproj; sourceTree = ""; }; + D80EC5122AB07A5E000C82D7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; DFCB80482472D6770058D292 /* OCHamcrest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OCHamcrest.xcodeproj; path = ../../Vendor/OCHamcrest/Source/OCHamcrest.xcodeproj; sourceTree = ""; }; F82E4C74217F1FD600EDAB34 /* sqlite3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sqlite3.c; path = ../../Vendor/SQLite3/sqlite3.c; sourceTree = ""; }; F851DAEC1E81867D00525570 /* MSACCrashesCXXExceptionTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MSACCrashesCXXExceptionTests.mm; sourceTree = ""; }; @@ -1088,6 +1089,7 @@ 6E04012A1D1C98690051BCFA = { isa = PBXGroup; children = ( + D80EC5122AB07A5E000C82D7 /* PrivacyInfo.xcprivacy */, D55737BC254AB33100B64478 /* AppCenter */, 6E0401351D1C98690051BCFA /* AppCenterCrashes */, 6E171AE21D22F781000DC480 /* AppCenterCrashesTests */, diff --git a/AppCenterCrashes/PrivacyInfo.xcprivacy b/AppCenterCrashes/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..e2e2a1315e --- /dev/null +++ b/AppCenterCrashes/PrivacyInfo.xcprivacy @@ -0,0 +1,86 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeDeviceID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePhotosorVideos + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeCrashData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePerformanceData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDiagnosticData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + + + + diff --git a/AppCenterDistribute/AppCenterDistribute.xcodeproj/project.pbxproj b/AppCenterDistribute/AppCenterDistribute.xcodeproj/project.pbxproj index 3b0571dd84..5e1bdc73ca 100644 --- a/AppCenterDistribute/AppCenterDistribute.xcodeproj/project.pbxproj +++ b/AppCenterDistribute/AppCenterDistribute.xcodeproj/project.pbxproj @@ -386,6 +386,7 @@ C97E8632257F96E800717834 /* error_details_no_release.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = error_details_no_release.json; sourceTree = ""; }; C9A91F8C230BFFFF0068070D /* AppCenterDistribute.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppCenterDistribute.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C9EBAB36230D73A800A20F0F /* AppCenter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AppCenter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D80EC53C2AB07ABB000C82D7 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; DFCB806D2472D71C0058D292 /* OCHamcrest.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OCHamcrest.xcodeproj; path = ../../Vendor/OCHamcrest/Source/OCHamcrest.xcodeproj; sourceTree = ""; }; DFE954F2244D8B410061E3FA /* HTTPStubs.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTTPStubs.m; sourceTree = ""; }; DFE954F3244D8B410061E3FA /* NSURLRequest+HTTPBodyTesting.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSURLRequest+HTTPBodyTesting.m"; sourceTree = ""; }; @@ -527,6 +528,7 @@ 04FD4A131E451E12009B4468 = { isa = PBXGroup; children = ( + D80EC53C2AB07ABB000C82D7 /* PrivacyInfo.xcprivacy */, 040AF0321E52859F005C1174 /* MSACIngestionProtocol.h */, 04FD4A1E1E451E12009B4468 /* AppCenterDistribute */, 04FD4A321E453531009B4468 /* AppCenterDistributeTests */, diff --git a/AppCenterDistribute/PrivacyInfo.xcprivacy b/AppCenterDistribute/PrivacyInfo.xcprivacy new file mode 100644 index 0000000000..e2e2a1315e --- /dev/null +++ b/AppCenterDistribute/PrivacyInfo.xcprivacy @@ -0,0 +1,86 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeDeviceID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePhotosorVideos + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeCrashData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePerformanceData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDiagnosticData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md index 23b08eb2f9..9a601c9d84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # App Center SDK for iOS, macOS and tvOS Change Log +## Version 5.0.4 + +* **[Improvement]** Update App Center SDK to include privacy manifest. +* **[Improvement]** Add `dataResidencyRegion` option to allow customers set residency of data for current user/device. + ## Version 5.0.3 * **[Fix]** Fix the build issue with Xcode 15 beta when integrating via Swift Package Manager. From 88d87ed92beb19f6144ae04e868172d2ef2c19ec Mon Sep 17 00:00:00 2001 From: Anatoly Pristensky Date: Mon, 18 Sep 2023 14:35:22 +0200 Subject: [PATCH 4/4] Update CHANGELOG.md for 5.0.4 release (#2504) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a601c9d84..6322fcd29b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Version 5.0.4 * **[Improvement]** Update App Center SDK to include privacy manifest. -* **[Improvement]** Add `dataResidencyRegion` option to allow customers set residency of data for current user/device. +* **[Internal]** Add `dataResidencyRegion` option. ## Version 5.0.3