From 92a1ff55f6c81503b7876f160781e8b9bed5caca Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 14 May 2024 11:34:51 +0530 Subject: [PATCH 1/3] feat: added gcp_na region --- Sources/CSDefinitions.swift | 2 ++ Tests/ContentstackTests.swift | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/Sources/CSDefinitions.swift b/Sources/CSDefinitions.swift index 2fd788fa..0966345b 100644 --- a/Sources/CSDefinitions.swift +++ b/Sources/CSDefinitions.swift @@ -38,6 +38,8 @@ public enum ContentstackRegion: String { case azure_na = "azure-na" /// This region is for AZURE-EU Cloud case azure_eu = "azure-eu" + /// This region is for GCP-NA Cloud + case gcp_na = "gcp-na" } /// The cache policies allow you to define the source from where the SDK will retrieve the content. public enum CachePolicy { diff --git a/Tests/ContentstackTests.swift b/Tests/ContentstackTests.swift index fa20f159..050c264a 100644 --- a/Tests/ContentstackTests.swift +++ b/Tests/ContentstackTests.swift @@ -35,6 +35,13 @@ final class ContentstackTests: XCTestCase { XCTAssertEqual(stack.region, ContentstackRegion.azure_na) XCTAssertNil(stack.branch) } + + func testStack_GCP_NAHostRegion_ReturnStackWithGCPValue () { + let stack = makeStackSut(region: .gcp_na) + XCTAssertEqual(stack.host, "gcp-na-cdn.contentstack.com") + XCTAssertEqual(stack.region, ContentstackRegion.gcp_na) + XCTAssertNil(stack.branch) + } func testStack_NewHost_ReturnStackWithNewHost () { let host = "api.contentstack.com" From 4390fb96c1739bbb0ae5999dcadc9afdbaae3f82 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Thu, 16 May 2024 09:47:53 +0530 Subject: [PATCH 2/3] feat: added privacy manifest file --- .talismanrc | 2 +- Contentstack.xcodeproj/project.pbxproj | 24 ++++++++++++++++++--- Sources/PrivacyInfo.xcprivacy | 29 ++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 Sources/PrivacyInfo.xcprivacy diff --git a/.talismanrc b/.talismanrc index 3befe6d9..fefa91a8 100644 --- a/.talismanrc +++ b/.talismanrc @@ -10,7 +10,7 @@ fileignoreconfig: - filename: Sources/Decodable.swift checksum: 45760eb1b21207395da2b631bb85049b300d399f20f59a79cfdc181a5d6b07f3 - filename: Contentstack.xcodeproj/project.pbxproj - checksum: 5e73942ffcdf6031c37e1167029a89522dbb936e7292a08033db6b3f95c63d2c + checksum: 7e5cf42f7c32f1dbaf5ceb9e25ae63859d39d5a26c20d15b9096256743b7f44f - filename: Sources/ContentstackConfig.swift checksum: fdb57e110cb65443e853f0d79ced1e80427d0d1720d21309aa8c87984ea5fac5 - filename: Tests/DVRRecordings/Asset.json diff --git a/Contentstack.xcodeproj/project.pbxproj b/Contentstack.xcodeproj/project.pbxproj index ed6c5147..ebfe55a1 100644 --- a/Contentstack.xcodeproj/project.pbxproj +++ b/Contentstack.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -264,6 +264,13 @@ 0FFBB44C24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; }; 0FFBB44D24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; }; 0FFBB44E24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; }; + 640BA9222BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; + 640BA9232BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; + 640BA9242BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; + 640BA9252BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; + 640BA9262BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; + 640BA9272BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; + 640BA9282BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -384,6 +391,7 @@ 0FFBB4422446F219000D2795 /* AssetQueryAPITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssetQueryAPITest.swift; sourceTree = ""; }; 0FFBB4462446F9A4000D2795 /* Asset.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Asset.json; sourceTree = ""; }; 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentStackLogTest.swift; sourceTree = ""; }; + 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; OBJ_17 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; OBJ_18 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; @@ -706,6 +714,7 @@ 0FFA5D79241F7033003B3AF5 /* ContentType.swift */, 0F4A762B241BB0D200E3A024 /* Contentstack.swift */, 0FFA5D56241F5085003B3AF5 /* ContentstackConfig.swift */, + 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */, ); path = Sources; sourceTree = SOURCE_ROOT; @@ -961,6 +970,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 640BA9222BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -974,6 +984,7 @@ 0F359991257BE29B00B3DB89 /* Asset.json in Resources */, 0F359992257BE2A700B3DB89 /* ContentType.json in Resources */, 0F4C0A87243C6990006604B7 /* config.json in Resources */, + 640BA9232BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, 0F5794C2266A37120082815C /* Paragraph.Json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -982,6 +993,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 640BA9242BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -995,6 +1007,7 @@ 0F50EA17244ED7F500E5D705 /* QueryOn.json in Resources */, 0F796C532449EA8700EA04D5 /* Entry.json in Resources */, 0F4C0A88243C6990006604B7 /* config.json in Resources */, + 640BA9252BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, 0F5794C3266A37120082815C /* Paragraph.Json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1003,6 +1016,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 640BA9262BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1016,6 +1030,7 @@ 0F50EA18244ED7F500E5D705 /* QueryOn.json in Resources */, 0F796C542449EA8700EA04D5 /* Entry.json in Resources */, 0F4C0A89243C6990006604B7 /* config.json in Resources */, + 640BA9272BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, 0F5794C4266A37120082815C /* Paragraph.Json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1024,6 +1039,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 640BA9282BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1374,7 +1390,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = "Supporting Files/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1450,7 +1466,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = "Supporting Files/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2343,6 +2359,7 @@ "SWIFT_PACKAGE=1", "DEBUG=1", ); + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 10.13; ONLY_ACTIVE_ARCH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; @@ -2369,6 +2386,7 @@ "$(inherited)", "SWIFT_PACKAGE=1", ); + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MACOSX_DEPLOYMENT_TARGET = 10.13; OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Sources/PrivacyInfo.xcprivacy b/Sources/PrivacyInfo.xcprivacy new file mode 100644 index 00000000..0ea3f535 --- /dev/null +++ b/Sources/PrivacyInfo.xcprivacy @@ -0,0 +1,29 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + NSPrivacyAccessedAPITypes + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + + + + + + From ecea9055c3bf6072dace502e769f4de1711ee854 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Thu, 16 May 2024 10:15:19 +0530 Subject: [PATCH 3/3] fix: added privacy file to targets --- .talismanrc | 2 +- Contentstack.xcodeproj/project.pbxproj | 32 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.talismanrc b/.talismanrc index fefa91a8..87c34e16 100644 --- a/.talismanrc +++ b/.talismanrc @@ -10,7 +10,7 @@ fileignoreconfig: - filename: Sources/Decodable.swift checksum: 45760eb1b21207395da2b631bb85049b300d399f20f59a79cfdc181a5d6b07f3 - filename: Contentstack.xcodeproj/project.pbxproj - checksum: 7e5cf42f7c32f1dbaf5ceb9e25ae63859d39d5a26c20d15b9096256743b7f44f + checksum: d6e294f366b1360458c31edbfc4601e7e75d3cafbebd594d83221801ee88dc07 - filename: Sources/ContentstackConfig.swift checksum: fdb57e110cb65443e853f0d79ced1e80427d0d1720d21309aa8c87984ea5fac5 - filename: Tests/DVRRecordings/Asset.json diff --git a/Contentstack.xcodeproj/project.pbxproj b/Contentstack.xcodeproj/project.pbxproj index ebfe55a1..928a3dca 100644 --- a/Contentstack.xcodeproj/project.pbxproj +++ b/Contentstack.xcodeproj/project.pbxproj @@ -264,13 +264,13 @@ 0FFBB44C24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; }; 0FFBB44D24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; }; 0FFBB44E24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; }; - 640BA9222BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; - 640BA9232BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; - 640BA9242BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; - 640BA9252BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; - 640BA9262BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; - 640BA9272BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; - 640BA9282BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */; }; + 64F522062BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; }; + 64F522072BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; }; + 64F522082BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; }; + 64F522092BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; }; + 64F5220A2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; }; + 64F5220B2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; }; + 64F5220C2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -391,7 +391,7 @@ 0FFBB4422446F219000D2795 /* AssetQueryAPITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssetQueryAPITest.swift; sourceTree = ""; }; 0FFBB4462446F9A4000D2795 /* Asset.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Asset.json; sourceTree = ""; }; 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentStackLogTest.swift; sourceTree = ""; }; - 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; OBJ_17 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; OBJ_18 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; @@ -714,7 +714,7 @@ 0FFA5D79241F7033003B3AF5 /* ContentType.swift */, 0F4A762B241BB0D200E3A024 /* Contentstack.swift */, 0FFA5D56241F5085003B3AF5 /* ContentstackConfig.swift */, - 640BA9212BF3027D00617846 /* PrivacyInfo.xcprivacy */, + 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */, ); path = Sources; sourceTree = SOURCE_ROOT; @@ -970,7 +970,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 640BA9222BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, + 64F522062BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -984,7 +984,7 @@ 0F359991257BE29B00B3DB89 /* Asset.json in Resources */, 0F359992257BE2A700B3DB89 /* ContentType.json in Resources */, 0F4C0A87243C6990006604B7 /* config.json in Resources */, - 640BA9232BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, + 64F522072BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */, 0F5794C2266A37120082815C /* Paragraph.Json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -993,7 +993,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 640BA9242BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, + 64F522082BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1007,7 +1007,7 @@ 0F50EA17244ED7F500E5D705 /* QueryOn.json in Resources */, 0F796C532449EA8700EA04D5 /* Entry.json in Resources */, 0F4C0A88243C6990006604B7 /* config.json in Resources */, - 640BA9252BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, + 64F522092BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */, 0F5794C3266A37120082815C /* Paragraph.Json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1016,7 +1016,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 640BA9262BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, + 64F5220A2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1030,7 +1030,7 @@ 0F50EA18244ED7F500E5D705 /* QueryOn.json in Resources */, 0F796C542449EA8700EA04D5 /* Entry.json in Resources */, 0F4C0A89243C6990006604B7 /* config.json in Resources */, - 640BA9272BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, + 64F5220B2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */, 0F5794C4266A37120082815C /* Paragraph.Json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1039,7 +1039,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 640BA9282BF3027D00617846 /* PrivacyInfo.xcprivacy in Resources */, + 64F5220C2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; };