Skip to content

Commit cf8b7cb

Browse files
Merge pull request #35 from contentstack/feat/dx-84
feat: added gcp_na region
2 parents 96ebbfe + ab9e961 commit cf8b7cb

File tree

5 files changed

+60
-4
lines changed

5 files changed

+60
-4
lines changed

.talismanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fileignoreconfig:
1010
- filename: Sources/Decodable.swift
1111
checksum: 45760eb1b21207395da2b631bb85049b300d399f20f59a79cfdc181a5d6b07f3
1212
- filename: Contentstack.xcodeproj/project.pbxproj
13-
checksum: 5e73942ffcdf6031c37e1167029a89522dbb936e7292a08033db6b3f95c63d2c
13+
checksum: d6e294f366b1360458c31edbfc4601e7e75d3cafbebd594d83221801ee88dc07
1414
- filename: Sources/ContentstackConfig.swift
1515
checksum: fdb57e110cb65443e853f0d79ced1e80427d0d1720d21309aa8c87984ea5fac5
1616
- filename: Tests/DVRRecordings/Asset.json

Contentstack.xcodeproj/project.pbxproj

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 52;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -264,6 +264,13 @@
264264
0FFBB44C24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; };
265265
0FFBB44D24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; };
266266
0FFBB44E24470C43000D2795 /* ContentStackLogTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */; };
267+
64F522062BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; };
268+
64F522072BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; };
269+
64F522082BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; };
270+
64F522092BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; };
271+
64F5220A2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; };
272+
64F5220B2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; };
273+
64F5220C2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */; };
267274
/* End PBXBuildFile section */
268275

269276
/* Begin PBXContainerItemProxy section */
@@ -384,6 +391,7 @@
384391
0FFBB4422446F219000D2795 /* AssetQueryAPITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssetQueryAPITest.swift; sourceTree = "<group>"; };
385392
0FFBB4462446F9A4000D2795 /* Asset.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Asset.json; sourceTree = "<group>"; };
386393
0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentStackLogTest.swift; sourceTree = "<group>"; };
394+
64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
387395
OBJ_17 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
388396
OBJ_18 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
389397
OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
@@ -706,6 +714,7 @@
706714
0FFA5D79241F7033003B3AF5 /* ContentType.swift */,
707715
0F4A762B241BB0D200E3A024 /* Contentstack.swift */,
708716
0FFA5D56241F5085003B3AF5 /* ContentstackConfig.swift */,
717+
64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */,
709718
);
710719
path = Sources;
711720
sourceTree = SOURCE_ROOT;
@@ -961,6 +970,7 @@
961970
isa = PBXResourcesBuildPhase;
962971
buildActionMask = 2147483647;
963972
files = (
973+
64F522062BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
964974
);
965975
runOnlyForDeploymentPostprocessing = 0;
966976
};
@@ -974,6 +984,7 @@
974984
0F359991257BE29B00B3DB89 /* Asset.json in Resources */,
975985
0F359992257BE2A700B3DB89 /* ContentType.json in Resources */,
976986
0F4C0A87243C6990006604B7 /* config.json in Resources */,
987+
64F522072BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
977988
0F5794C2266A37120082815C /* Paragraph.Json in Resources */,
978989
);
979990
runOnlyForDeploymentPostprocessing = 0;
@@ -982,6 +993,7 @@
982993
isa = PBXResourcesBuildPhase;
983994
buildActionMask = 2147483647;
984995
files = (
996+
64F522082BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
985997
);
986998
runOnlyForDeploymentPostprocessing = 0;
987999
};
@@ -995,6 +1007,7 @@
9951007
0F50EA17244ED7F500E5D705 /* QueryOn.json in Resources */,
9961008
0F796C532449EA8700EA04D5 /* Entry.json in Resources */,
9971009
0F4C0A88243C6990006604B7 /* config.json in Resources */,
1010+
64F522092BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
9981011
0F5794C3266A37120082815C /* Paragraph.Json in Resources */,
9991012
);
10001013
runOnlyForDeploymentPostprocessing = 0;
@@ -1003,6 +1016,7 @@
10031016
isa = PBXResourcesBuildPhase;
10041017
buildActionMask = 2147483647;
10051018
files = (
1019+
64F5220A2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10061020
);
10071021
runOnlyForDeploymentPostprocessing = 0;
10081022
};
@@ -1016,6 +1030,7 @@
10161030
0F50EA18244ED7F500E5D705 /* QueryOn.json in Resources */,
10171031
0F796C542449EA8700EA04D5 /* Entry.json in Resources */,
10181032
0F4C0A89243C6990006604B7 /* config.json in Resources */,
1033+
64F5220B2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10191034
0F5794C4266A37120082815C /* Paragraph.Json in Resources */,
10201035
);
10211036
runOnlyForDeploymentPostprocessing = 0;
@@ -1024,6 +1039,7 @@
10241039
isa = PBXResourcesBuildPhase;
10251040
buildActionMask = 2147483647;
10261041
files = (
1042+
64F5220C2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10271043
);
10281044
runOnlyForDeploymentPostprocessing = 0;
10291045
};
@@ -1374,7 +1390,7 @@
13741390
GCC_WARN_UNUSED_VARIABLE = YES;
13751391
INFOPLIST_FILE = "Supporting Files/Info.plist";
13761392
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1377-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1393+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
13781394
LD_RUNPATH_SEARCH_PATHS = (
13791395
"$(inherited)",
13801396
"@executable_path/Frameworks",
@@ -1450,7 +1466,7 @@
14501466
GCC_WARN_UNUSED_VARIABLE = YES;
14511467
INFOPLIST_FILE = "Supporting Files/Info.plist";
14521468
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1453-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1469+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
14541470
LD_RUNPATH_SEARCH_PATHS = (
14551471
"$(inherited)",
14561472
"@executable_path/Frameworks",
@@ -2343,6 +2359,7 @@
23432359
"SWIFT_PACKAGE=1",
23442360
"DEBUG=1",
23452361
);
2362+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
23462363
MACOSX_DEPLOYMENT_TARGET = 10.13;
23472364
ONLY_ACTIVE_ARCH = YES;
23482365
OTHER_SWIFT_FLAGS = "$(inherited) -DXcode";
@@ -2369,6 +2386,7 @@
23692386
"$(inherited)",
23702387
"SWIFT_PACKAGE=1",
23712388
);
2389+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
23722390
MACOSX_DEPLOYMENT_TARGET = 10.13;
23732391
OTHER_SWIFT_FLAGS = "$(inherited) -DXcode";
23742392
PRODUCT_NAME = "$(TARGET_NAME)";

Sources/CSDefinitions.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public enum ContentstackRegion: String {
3838
case azure_na = "azure-na"
3939
/// This region is for AZURE-EU Cloud
4040
case azure_eu = "azure-eu"
41+
/// This region is for GCP-NA Cloud
42+
case gcp_na = "gcp-na"
4143
}
4244
/// The cache policies allow you to define the source from where the SDK will retrieve the content.
4345
public enum CachePolicy {

Sources/PrivacyInfo.xcprivacy

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSPrivacyTracking</key>
6+
<false/>
7+
<key>NSPrivacyTrackingDomains</key>
8+
<array/>
9+
<key>NSPrivacyAccessedAPITypes</key>
10+
<array>
11+
<dict/>
12+
</array>
13+
<key>NSPrivacyCollectedDataTypes</key>
14+
<array>
15+
<dict>
16+
<key>NSPrivacyCollectedDataType</key>
17+
<string></string>
18+
<key>NSPrivacyCollectedDataTypeLinked</key>
19+
<false/>
20+
<key>NSPrivacyCollectedDataTypeTracking</key>
21+
<false/>
22+
<key>NSPrivacyCollectedDataTypePurposes</key>
23+
<array>
24+
<string></string>
25+
</array>
26+
</dict>
27+
</array>
28+
</dict>
29+
</plist>

Tests/ContentstackTests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ final class ContentstackTests: XCTestCase {
3535
XCTAssertEqual(stack.region, ContentstackRegion.azure_na)
3636
XCTAssertNil(stack.branch)
3737
}
38+
39+
func testStack_GCP_NAHostRegion_ReturnStackWithGCPValue () {
40+
let stack = makeStackSut(region: .gcp_na)
41+
XCTAssertEqual(stack.host, "gcp-na-cdn.contentstack.com")
42+
XCTAssertEqual(stack.region, ContentstackRegion.gcp_na)
43+
XCTAssertNil(stack.branch)
44+
}
3845

3946
func testStack_NewHost_ReturnStackWithNewHost () {
4047
let host = "api.contentstack.com"

0 commit comments

Comments
 (0)