Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fileignoreconfig:
- filename: Sources/Decodable.swift
checksum: 45760eb1b21207395da2b631bb85049b300d399f20f59a79cfdc181a5d6b07f3
- filename: Contentstack.xcodeproj/project.pbxproj
checksum: 5e73942ffcdf6031c37e1167029a89522dbb936e7292a08033db6b3f95c63d2c
checksum: d6e294f366b1360458c31edbfc4601e7e75d3cafbebd594d83221801ee88dc07
- filename: Sources/ContentstackConfig.swift
checksum: fdb57e110cb65443e853f0d79ced1e80427d0d1720d21309aa8c87984ea5fac5
- filename: Tests/DVRRecordings/Asset.json
Expand Down
24 changes: 21 additions & 3 deletions Contentstack.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -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 */; };
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 */
Expand Down Expand Up @@ -384,6 +391,7 @@
0FFBB4422446F219000D2795 /* AssetQueryAPITest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssetQueryAPITest.swift; sourceTree = "<group>"; };
0FFBB4462446F9A4000D2795 /* Asset.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Asset.json; sourceTree = "<group>"; };
0FFBB44B24470C43000D2795 /* ContentStackLogTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentStackLogTest.swift; sourceTree = "<group>"; };
64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
OBJ_17 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
OBJ_18 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -706,6 +714,7 @@
0FFA5D79241F7033003B3AF5 /* ContentType.swift */,
0F4A762B241BB0D200E3A024 /* Contentstack.swift */,
0FFA5D56241F5085003B3AF5 /* ContentstackConfig.swift */,
64F522052BF5C65300AE6E0F /* PrivacyInfo.xcprivacy */,
);
path = Sources;
sourceTree = SOURCE_ROOT;
Expand Down Expand Up @@ -961,6 +970,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
64F522062BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -974,6 +984,7 @@
0F359991257BE29B00B3DB89 /* Asset.json in Resources */,
0F359992257BE2A700B3DB89 /* ContentType.json in Resources */,
0F4C0A87243C6990006604B7 /* config.json in Resources */,
64F522072BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
0F5794C2266A37120082815C /* Paragraph.Json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -982,6 +993,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
64F522082BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -995,6 +1007,7 @@
0F50EA17244ED7F500E5D705 /* QueryOn.json in Resources */,
0F796C532449EA8700EA04D5 /* Entry.json in Resources */,
0F4C0A88243C6990006604B7 /* config.json in Resources */,
64F522092BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
0F5794C3266A37120082815C /* Paragraph.Json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -1003,6 +1016,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
64F5220A2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -1016,6 +1030,7 @@
0F50EA18244ED7F500E5D705 /* QueryOn.json in Resources */,
0F796C542449EA8700EA04D5 /* Entry.json in Resources */,
0F4C0A89243C6990006604B7 /* config.json in Resources */,
64F5220B2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
0F5794C4266A37120082815C /* Paragraph.Json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -1024,6 +1039,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
64F5220C2BF5C65300AE6E0F /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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";
Expand All @@ -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)";
Expand Down
2 changes: 2 additions & 0 deletions Sources/CSDefinitions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
29 changes: 29 additions & 0 deletions Sources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict/>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string></string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string></string>
</array>
</dict>
</array>
</dict>
</plist>
7 changes: 7 additions & 0 deletions Tests/ContentstackTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down