Skip to content

Commit 21ca6b2

Browse files
Vikram KaltaVikram Kalta
authored andcommitted
fix: resolved conflicts
2 parents d875df8 + a3fee41 commit 21ca6b2

File tree

7 files changed

+49
-57
lines changed

7 files changed

+49
-57
lines changed

.github/workflows/secrets-scan.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.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: 863f60ede1c65e01e4fa8c68029e6045abd3b6ab718447743afd1eb6a3e6f80e
13+
checksum: d6e294f366b1360458c31edbfc4601e7e75d3cafbebd594d83221801ee88dc07
1414
- filename: Sources/ContentstackConfig.swift
1515
checksum: fdb57e110cb65443e853f0d79ced1e80427d0d1720d21309aa8c87984ea5fac5
1616
- filename: Tests/DVRRecordings/Asset.json

Contentstack.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@
748748
0F4A762B241BB0D200E3A024 /* Contentstack.swift */,
749749
0FFA5D56241F5085003B3AF5 /* ContentstackConfig.swift */,
750750
47C6EFC12C0B5B9400F0D5CF /* Taxonomy.swift */,
751+
64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */,
751752
);
752753
path = Sources;
753754
sourceTree = SOURCE_ROOT;
@@ -1008,6 +1009,7 @@
10081009
isa = PBXResourcesBuildPhase;
10091010
buildActionMask = 2147483647;
10101011
files = (
1012+
64F522062BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10111013
);
10121014
runOnlyForDeploymentPostprocessing = 0;
10131015
};
@@ -1021,6 +1023,7 @@
10211023
0F359991257BE29B00B3DB89 /* Asset.json in Resources */,
10221024
0F359992257BE2A700B3DB89 /* ContentType.json in Resources */,
10231025
0F4C0A87243C6990006604B7 /* config.json in Resources */,
1026+
64F522072BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10241027
0F5794C2266A37120082815C /* Paragraph.Json in Resources */,
10251028
);
10261029
runOnlyForDeploymentPostprocessing = 0;
@@ -1029,6 +1032,7 @@
10291032
isa = PBXResourcesBuildPhase;
10301033
buildActionMask = 2147483647;
10311034
files = (
1035+
64F522082BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10321036
);
10331037
runOnlyForDeploymentPostprocessing = 0;
10341038
};
@@ -1042,6 +1046,7 @@
10421046
0F50EA17244ED7F500E5D705 /* QueryOn.json in Resources */,
10431047
0F796C532449EA8700EA04D5 /* Entry.json in Resources */,
10441048
0F4C0A88243C6990006604B7 /* config.json in Resources */,
1049+
64F522092BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10451050
0F5794C3266A37120082815C /* Paragraph.Json in Resources */,
10461051
);
10471052
runOnlyForDeploymentPostprocessing = 0;
@@ -1050,6 +1055,7 @@
10501055
isa = PBXResourcesBuildPhase;
10511056
buildActionMask = 2147483647;
10521057
files = (
1058+
64F5220A2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10531059
);
10541060
runOnlyForDeploymentPostprocessing = 0;
10551061
};
@@ -1063,6 +1069,7 @@
10631069
0F50EA18244ED7F500E5D705 /* QueryOn.json in Resources */,
10641070
0F796C542449EA8700EA04D5 /* Entry.json in Resources */,
10651071
0F4C0A89243C6990006604B7 /* config.json in Resources */,
1072+
64F5220B2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10661073
0F5794C4266A37120082815C /* Paragraph.Json in Resources */,
10671074
);
10681075
runOnlyForDeploymentPostprocessing = 0;
@@ -1071,6 +1078,7 @@
10711078
isa = PBXResourcesBuildPhase;
10721079
buildActionMask = 2147483647;
10731080
files = (
1081+
64F5220C2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
10741082
);
10751083
runOnlyForDeploymentPostprocessing = 0;
10761084
};

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>

Sources/Stack.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public class Stack: CachePolicyAccessible {
6969
}
7070

7171
var contentstackHTTPHeaders: [AnyHashable: Any] = [
72-
"api_key": apiKey,
73-
"access_token": deliveryToken,
7472
"X-User-Agent": config.sdkVersionString(),
7573
"User-Agent": config.userAgentString()
7674
]
@@ -178,6 +176,8 @@ public class Stack: CachePolicyAccessible {
178176
private func fetchUrl(_ url: URL, headers:[String: String], cachePolicy: CachePolicy, then completion: @escaping ResultsHandler<Data>) {
179177
var dataTask: URLSessionDataTask?
180178
var request = URLRequest(url: url)
179+
request.setValue(self.deliveryToken, forHTTPHeaderField: "access_token")
180+
request.setValue(self.apiKey, forHTTPHeaderField: "api_key")
181181
for header in headers {
182182
request.addValue(header.value, forHTTPHeaderField: header.key)
183183
}

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)