Skip to content

Commit eb81d48

Browse files
authored
Merge pull request #21 from contentstack/feat/CS-36095-ssl-pinning
SSL pinning for host support added
2 parents 9dbbda1 + 1e16a9b commit eb81d48

28 files changed

+217
-148
lines changed

.github/workflows/codeql-analysis.yml

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

.github/workflows/jira.yml

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

.github/workflows/sca-scan.yml

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

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### Version: 3.11.0
2+
#### Date: Apr-04-2023
3+
4+
##### Enahancement:
5+
- SSL pinning for CSURLSession using CSURLSessionDelegate
6+
17
### Version: 3.10.1
28
#### Date: Nov-11-2022
39

Contentstack.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Contentstack'
3-
s.version = '3.10.1'
3+
s.version = '3.11.0'
44
s.summary = 'Contentstack is a headless CMS with an API-first approach that puts content at the centre.'
55

66
s.description = <<-DESC
@@ -12,7 +12,7 @@ s.homepage = 'https://www.contentstack.com/'
1212
s.license = { :type => 'Commercial',:text => 'See https://www.contentstack.com/'}
1313
s.author = { 'Contentstack' => 'support@contentstack.io' }
1414

15-
s.source = { :git => 'https://github.com/contentstack/contentstack-ios.git', :tag => 'v3.10.1' }
15+
s.source = { :git => 'https://github.com/contentstack/contentstack-ios.git', :tag => 'v3.11.0' }
1616
s.social_media_url = 'https://twitter.com/Contentstack'
1717

1818
s.ios.deployment_target = '8.0'

Contentstack.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
0F9C0FC6221ADAC90091205A /* SyncStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9C0FAD221ADAC90091205A /* SyncStack.h */; settings = {ATTRIBUTES = (Public, ); }; };
4949
0F9C0FC7221ADAC90091205A /* Entry.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9C0FAE221ADAC90091205A /* Entry.h */; settings = {ATTRIBUTES = (Public, ); }; };
5050
0F9C0FC8221ADAC90091205A /* NamespacedDependencies.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9C0FB0221ADAC90091205A /* NamespacedDependencies.h */; };
51+
0FD6BAEF29CD6E73001A0930 /* CSURLSessionDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD6BAEE29CD6E73001A0930 /* CSURLSessionDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
5152
0FEAEF282361A18600985FF9 /* CSNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEAEF232361A18600985FF9 /* CSNetworking.h */; };
5253
0FEAEF292361A18600985FF9 /* CSError.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEAEF242361A18600985FF9 /* CSError.h */; settings = {ATTRIBUTES = (Public, ); }; };
5354
0FEAEF2A2361A18600985FF9 /* CSURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FEAEF252361A18600985FF9 /* CSURLSessionManager.m */; };
@@ -166,6 +167,7 @@
166167
0F9C0FAD221ADAC90091205A /* SyncStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncStack.h; sourceTree = "<group>"; };
167168
0F9C0FAE221ADAC90091205A /* Entry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Entry.h; sourceTree = "<group>"; };
168169
0F9C0FB0221ADAC90091205A /* NamespacedDependencies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamespacedDependencies.h; sourceTree = "<group>"; };
170+
0FD6BAEE29CD6E73001A0930 /* CSURLSessionDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CSURLSessionDelegate.h; sourceTree = "<group>"; };
169171
0FDC02D1254A9CFA005EDDE3 /* libContentstackUtils.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libContentstackUtils.a; sourceTree = BUILT_PRODUCTS_DIR; };
170172
0FEAEF232361A18600985FF9 /* CSNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSNetworking.h; sourceTree = "<group>"; };
171173
0FEAEF242361A18600985FF9 /* CSError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSError.h; sourceTree = "<group>"; };
@@ -307,6 +309,7 @@
307309
0F9C0FA7221ADAC80091205A /* Stack.m */,
308310
0F9C0FAD221ADAC90091205A /* SyncStack.h */,
309311
0F9C0FA0221ADAC80091205A /* SyncStack.m */,
312+
0FD6BAEE29CD6E73001A0930 /* CSURLSessionDelegate.h */,
310313
0F9C0FAF221ADAC90091205A /* ThirdPartyNamespaceHeader */,
311314
230B38C41C16E98B00444A14 /* Info.plist */,
312315
);
@@ -507,6 +510,7 @@
507510
230B39011C16EB8D00444A14 /* ISO8601DateFormatter.h in Headers */,
508511
23A53F401E276C83001DBE35 /* CSIOInternalHeaders.h in Headers */,
509512
0F9C0FB1221ADAC90091205A /* AssetLibrary.h in Headers */,
513+
0FD6BAEF29CD6E73001A0930 /* CSURLSessionDelegate.h in Headers */,
510514
0F9C0FB6221ADAC90091205A /* Config.h in Headers */,
511515
0F9C0FC2221ADAC90091205A /* Query.h in Headers */,
512516
0FEAEF292361A18600985FF9 /* CSError.h in Headers */,

Contentstack/Asset.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,22 @@ BUILT_ASSUME_NONNULL_BEGIN
200200
*/
201201
- (void)removeHeaderForKey:(NSString *)headerKey;
202202

203+
/**
204+
Include the metadata for getting metadata content for the asset.
205+
206+
//Obj-C
207+
Stack *stack = [Contentstack stackWithAPIKey:@"API_KEY" accessToken:@"DELIVERY_TOKEN" environmentName:@"ENVIRONMENT"];
208+
Asset *asset = [stack asset];
209+
[asset includeMetadata];
210+
211+
//Swift
212+
var stack:Stack = Contentstack.stackWithAPIKey("API_KEY", accessToken:"DELIVERY_TOKEN", environmentName:@"ENVIRONMENT")
213+
var asset:Asset = stack.asset()
214+
asset.includeMetadata()
215+
216+
*/
217+
-(void)includeMetadata;
218+
203219
/**
204220
Retrieve the published content of the fallback locale entry if the entry is not localized in specified locale.
205221

Contentstack/Asset.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ -(void)includeFallback {
131131
[self.postParamDictionary setObject:@"true" forKey:kCSIO_IncludeFallback];
132132
}
133133

134+
-(void)includeMetadata {
135+
[self.postParamDictionary setObject:@"true" forKey:kCSIO_IncludeMetadata];
136+
}
137+
134138
-(void)includeBranch {
135139
[self.postParamDictionary setObject:@"true" forKey:kCSIO_IncludeBranch];
136140
}

Contentstack/AssetLibrary.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,18 @@ typedef NS_ENUM(NSUInteger, OrderBy) {
105105
*/
106106
-(void)includeFallback;
107107

108+
/**
109+
Include the metadata for getting metadata content for the asset.
110+
111+
//Obj-C
112+
[assetLib includeMetadata];
113+
114+
//Swift
115+
assetLib.includeMetadata()
116+
117+
*/
118+
-(void)includeMetadata;
119+
108120
/**
109121
Retrieve the branch for the published content.
110122

Contentstack/AssetLibrary.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ -(void)includeFallback {
8787
[self.postParamDictionary setObject:@"true" forKey:kCSIO_IncludeFallback];
8888
}
8989

90+
-(void)includeMetadata {
91+
[self.postParamDictionary setObject:@"true" forKey:kCSIO_IncludeMetadata];
92+
}
93+
9094
-(void)includeBranch {
9195
[self.postParamDictionary setObject:@"true" forKey:kCSIO_IncludeBranch];
9296
}

0 commit comments

Comments
 (0)