Skip to content
Closed
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 .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CONTENTSTACK_SDK_VERSION=1.5.1
CONTENTSTACK_SDK_VERSION=1.6.3
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
with:
xcode-version: '15.4.0'

- name: Unzip DVR for Testing
run: |
unzip -q Utility/contentstack-swift-dvr.zip -d Utility/
echo "DVR unzipped for testing"

- name: Create config file
run: |
echo '{
Expand Down Expand Up @@ -79,6 +84,11 @@ jobs:
with:
xcode-version: '15.4.0'

- name: Unzip DVR for Testing
run: |
unzip -q Utility/contentstack-swift-dvr.zip -d Utility/
echo "DVR unzipped for testing"

- name: Create config file
run: |
echo '{
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ TestCase
docs

fastlane/
Gemfile
Gemfile

# Ignore unzipped DVR folder
Utility/contentstack-swift-dvr/
!Utility/contentstack-swift-dvr.zip
3 changes: 1 addition & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github "contentstack/contentstack-swift-dvr" "master"
github "contentstack/contentstack-utils-swift"
github "contentstack/contentstack-utils-swift" ~> 1.3.4
1 change: 0 additions & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github "contentstack/contentstack-swift-dvr" "c8040a2451e4bc2c312347531cac6c73f23ce50c"
github "contentstack/contentstack-utils-swift" "v1.3.4"
2 changes: 1 addition & 1 deletion Config.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CONTENTSTACK_SDK_VERSION = 1.5.1
CONTENTSTACK_SDK_VERSION = 1.6.3
24 changes: 24 additions & 0 deletions Contentstack iOS Tests.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"configurations" : [
{
"id" : "2A2297B9-D608-493E-86C3-89A25834B643",
"name" : "Test Scheme Action",
"options" : {

}
}
],
"defaultOptions" : {

},
"testTargets" : [
{
"target" : {
"containerPath" : "container:Contentstack.xcodeproj",
"identifier" : "0F4A75D2241BAC4300E3A024",
"name" : "Contentstack iOS Tests"
}
}
],
"version" : 1
}
12 changes: 2 additions & 10 deletions Contentstack.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = SMAKUMV86W;
DEVELOPMENT_TEAM = FLVTD4X723;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -1611,7 +1611,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = SMAKUMV86W;
DEVELOPMENT_TEAM = FLVTD4X723;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -2588,14 +2588,6 @@
kind = branch;
};
};
47D561532C9EFA1400DC085D /* XCRemoteSwiftPackageReference "contentstack-swift-dvr" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/contentstack/contentstack-swift-dvr.git";
requirement = {
branch = master;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0F4A75CA241BAC4300E3A024"
BuildableName = "Contentstack.framework"
BlueprintName = "Contentstack iOS"
ReferencedContainer = "container:Contentstack.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0F4A75CA241BAC4300E3A024"
BuildableName = "Contentstack.framework"
BlueprintName = "Contentstack iOS"
ReferencedContainer = "container:Contentstack.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
12 changes: 6 additions & 6 deletions ContentstackSwift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ Pod::Spec.new do |s|
}
s.source = { :git => 'https://github.com/contentstack/contentstack-swift.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/Contentstack'
s.swift_version = '5'
s.swift_version = '5.6'

s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.13'
s.watchos.deployment_target = '4.0'
s.tvos.deployment_target = '11.0'
s.ios.deployment_target = '13.0'
s.osx.deployment_target = '10.15'
s.watchos.deployment_target = '6.0'
s.tvos.deployment_target = '13.0'


s.source_files = 'Sources/**/*'

# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit'
s.dependency 'ContentstackUtils', '~> 1.3.0'
s.dependency 'ContentstackUtils', '~> 1.3.4'
end

28 changes: 11 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

// swift-tools-version:5.6
import PackageDescription



let package = Package(
name: "ContentstackSwift",
platforms: [.macOS(.v10_15),
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6)],

platforms: [.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6)],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "ContentstackSwift",
targets: ["ContentstackSwift"])
name: "ContentstackSwift",
targets: ["Contentstack"])
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/contentstack/contentstack-utils-swift.git", .branch("master")),
// Dev dependencies
.package(url: "https://github.com/contentstack/contentstack-swift-dvr.git", .branch("master"))
.package(url: "https://github.com/contentstack/contentstack-utils-swift.git", from: "1.3.4"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package,
//and on products in packages which this package depends on.
.target(
name: "ContentstackSwift",
dependencies: ["ContentstackUtils"],
name: "Contentstack",
dependencies: [.product(name: "ContentstackUtils", package: "contentstack-utils-swift")],
path: "Sources"),
.target(
name: "DVR",
path: "Utility/contentstack-swift-dvr/contentstack-swift-dvr-master.zip/Sources"),
.testTarget(
name: "ContentstackTests",
dependencies: ["ContentstackSwift", "DVR"],
dependencies: ["Contentstack", "DVR"],
path: "Tests")
]
)
2 changes: 1 addition & 1 deletion Scripts/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CONTENTSTACK_SDK_VERSION=1.4.0
CONTENTSTACK_SDK_VERSION=1.6.3
14 changes: 14 additions & 0 deletions Scripts/setup-test-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
# Run this script before building or testing the project

ZIP_PATH="Utility/contentstack-swift-dvr.zip"
UNZIP_DIR="Utility/contentstack-swift-dvr"

# Only unzip if the DVR source doesn't already exist
if [ ! -d "$UNZIP_DIR/Sources" ]; then
echo "🔧 Unzipping DVR testing framework..."
unzip -q "$ZIP_PATH" -d "$UNZIP_DIR"
echo "✅ DVR testing framework ready."
else
echo "✅ DVR already unzipped."
fi
4 changes: 4 additions & 0 deletions Sources/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

import Foundation

// Add these type aliases at the top level
public typealias CSAPIError = APIError
public typealias CSSDKError = SDKError

/// Possible errors being thrown by the SDK
public enum SDKError: Error, CustomDebugStringConvertible {

Expand Down
Binary file added Utility/contentstack-swift-dvr.zip
Binary file not shown.
Loading