Skip to content

Commit

Permalink
Merge branch 'development' into feat/DX-200_clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Netraj Patel committed Sep 24, 2024
2 parents 9df890c + c8055f6 commit 2468901
Show file tree
Hide file tree
Showing 19 changed files with 329 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Build
run: |
# Add commands to build and test your package
xcodebuild -workspace Contentstack.xcworkspace -scheme 'Contentstack' -destination 'platform=iOS Simulator,name=iPhone 13 Pro'
xcodebuild -workspace Contentstack.xcworkspace -scheme 'Contentstack' -destination 'platform=iOS Simulator,name=iPhone 15'
- name: CocoaPods trunk push
run: pod trunk push --allow-warnings
Expand Down
8 changes: 6 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
fileignoreconfig:
- filename: Contentstack.xcodeproj/project.pbxproj
checksum: 331c4ff2e540e9495ff2a0d030ddd7f7c2eda077cb0b1a58c67fc2312b53658e
version: ""
checksum: 10cb4bc5ca755f7392309a88cd6df510a45f8c527ea2f8edc71e1ae1fda60941
- filename: .github/workflows/sast-scan.yml
checksum: 5554abc81d130557f52d64d253c3a23b41fcf0642a9c599131b2c185665ce581
- filename: PrivacyInfo.xcprivacy
checksum: 7697fa6a0a5e0600d35d4678ffff9ef14c5dff5dc1613d37968de7ded3ff1fd0
version: ""
2 changes: 1 addition & 1 deletion Contentstack.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ s.version = '3.13.0'
s.summary = 'Contentstack is a headless CMS with an API-first approach that puts content at the centre.'

s.description = <<-DESC
Contentstack is a headless CMS with an API-first approach that puts content at the centre. It is designed to simplify the process of publication by separating code from content.
Contentstack is a headless CMS with an API-first approach that puts content at the centre. It is designed to simplify the process of publication by separating code from content.
In a world where content is consumed via countless channels and form factors across mobile, web and IoT. Contentstack reimagines content management by decoupling code from content. Business users manage content – no training or development required. Developers can create cross-platform apps and take advantage of a headless CMS that delivers content through APIs. With an architecture that’s extensible – but without the bloat of legacy CMS – Contentstack cuts down on infrastructure, maintenance, cost and complexity.
DESC

Expand Down
206 changes: 147 additions & 59 deletions Contentstack.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
LastUpgradeVersion = "1540"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Contentstack/Asset.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>

BUILT_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion Contentstack/AssetLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>

BUILT_ASSUME_NONNULL_BEGIN

Expand Down
4 changes: 2 additions & 2 deletions Contentstack/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import "CSURLSessionDelegate.h"
#import <Contentstack/ContentstackDefinitions.h>
#import <Contentstack/CSURLSessionDelegate.h>
@interface Config : NSObject

/**----------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Contentstack/ContentType.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>

@class Entry;
@class Query;
Expand Down
36 changes: 35 additions & 1 deletion Contentstack/Entry.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>

@class Asset;
@class Group;
Expand Down Expand Up @@ -87,6 +87,10 @@ BUILT_ASSUME_NONNULL_BEGIN
* Readonly property to check deletedBy of entry
*/
@property (nonatomic, copy, readonly) NSString *deletedBy;
/**
* Readonly property to check deletedBy of entry
*/
@property (nonatomic, copy, readonly) NSMutableDictionary *localHeaders;


/**
Expand Down Expand Up @@ -124,6 +128,36 @@ BUILT_ASSUME_NONNULL_BEGIN
*/
- (void)setHeader:(NSString *)headerValue forKey:(NSString *)headerKey;

/**
Set a single variant uid as header
//'API_KEY' is a ENVIRONMENT Stack API key
//Obj-C
[entryObj variantUid:@"variantUid"];
//Swift
entryObj.variantUid("variantUid")
@param variantUid The variant uid
*/
- (void)variantUid:(NSString *)variantUid;

/**
Set multiple variant uids as header
//'API_KEY' is a ENVIRONMENT Stack API key
//Obj-C
[entryObj variantUids:@["variant1", "variant2"]];
//Swift
entryObj.setHeader(["variant1", "variant2"])
@param variantUids The variant uids
*/
- (void)variantUids:(NSArray *)variantUids;

/**
Set a header for Entry
Expand Down
11 changes: 11 additions & 0 deletions Contentstack/Entry.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ - (void)setHeader:(NSString *)headerValue forKey:(NSString *)headerKey {
[self.localHeaders setObject:headerValue forKey:headerKey];
}

- (void)variantUid:(NSString *)variantUid {
NSString *key = @"x-cs-variant-uid";
[self.localHeaders setObject:variantUid forKey: key];
}

- (void)variantUids:(NSArray *)variantUids {
NSString *key = @"x-cs-variant-uid";
NSString *joinedString = [variantUids componentsJoinedByString:@","];
[self.localHeaders setObject:joinedString forKey: key];
}

- (void)addHeadersWithDictionary:(NSDictionary<NSString *, NSString *> *)headers {
[headers enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
[self.localHeaders setObject:obj forKey:key];
Expand Down
2 changes: 1 addition & 1 deletion Contentstack/Group.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>


@class Asset;
Expand Down
2 changes: 1 addition & 1 deletion Contentstack/Query.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>

@class QueryResult;
@class Entry;
Expand Down
2 changes: 1 addition & 1 deletion Contentstack/QueryResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>

BUILT_ASSUME_NONNULL_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion Contentstack/Stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>

@class Config;
@class ContentType;
Expand Down
2 changes: 1 addition & 1 deletion Contentstack/Taxonomy.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
#import "ContentstackDefinitions.h"
#import <Contentstack/ContentstackDefinitions.h>

@class Query;

Expand Down
Loading

0 comments on commit 2468901

Please sign in to comment.