Skip to content

Commit 44a8f42

Browse files
authored
Merge pull request #50 from contentstack/staging
Merge Staging to Master
2 parents 8c89e29 + d144454 commit 44a8f42

File tree

24 files changed

+556
-145
lines changed

24 files changed

+556
-145
lines changed

.github/workflows/check-branch.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Check Branch'
1+
name: "Check Branch"
22

33
on:
44
pull_request:
@@ -8,13 +8,13 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Comment PR
11-
if: github.base_ref == 'master' && github.head_ref != 'next'
11+
if: github.base_ref == 'master' && github.head_ref != 'staging'
1212
uses: thollander/actions-comment-pull-request@v2
1313
with:
1414
message: |
15-
We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.
15+
We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the staging branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.
1616
- name: Check branch
17-
if: github.base_ref == 'master' && github.head_ref != 'next'
17+
if: github.base_ref == 'master' && github.head_ref != 'staging'
1818
run: |
19-
echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch."
20-
exit 1
19+
echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the staging branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch."
20+
exit 1

.github/workflows/release-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Build
2525
run: |
2626
# Add commands to build and test your package
27-
xcodebuild -workspace Contentstack.xcworkspace -scheme 'Contentstack' -destination 'platform=iOS Simulator,name=iPhone 13 Pro'
27+
xcodebuild -workspace Contentstack.xcworkspace -scheme 'Contentstack' -destination 'platform=iOS Simulator,name=iPhone 15'
2828
2929
- name: CocoaPods trunk push
3030
run: pod trunk push --allow-warnings

.talismanrc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
fileignoreconfig:
22
- filename: Contentstack.xcodeproj/project.pbxproj
3-
checksum: 331c4ff2e540e9495ff2a0d030ddd7f7c2eda077cb0b1a58c67fc2312b53658e
4-
version: ""
3+
checksum: 10cb4bc5ca755f7392309a88cd6df510a45f8c527ea2f8edc71e1ae1fda60941
4+
- filename: .github/workflows/sast-scan.yml
5+
checksum: 5554abc81d130557f52d64d253c3a23b41fcf0642a9c599131b2c185665ce581
6+
- filename: PrivacyInfo.xcprivacy
7+
checksum: 7697fa6a0a5e0600d35d4678ffff9ef14c5dff5dc1613d37968de7ded3ff1fd0
8+
version: ""

Contentstack.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ s.version = '3.13.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
7-
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.
7+
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.
88
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.
99
DESC
1010

Contentstack.xcodeproj/project.pbxproj

Lines changed: 147 additions & 59 deletions
Large diffs are not rendered by default.

Contentstack.xcodeproj/xcshareddata/xcschemes/Contentstack.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1540"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Contentstack/Asset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import <Foundation/Foundation.h>
10-
#import "ContentstackDefinitions.h"
10+
#import <Contentstack/ContentstackDefinitions.h>
1111

1212
BUILT_ASSUME_NONNULL_BEGIN
1313

Contentstack/AssetLibrary.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#import <Foundation/Foundation.h>
10-
#import "ContentstackDefinitions.h"
10+
#import <Contentstack/ContentstackDefinitions.h>
1111

1212
BUILT_ASSUME_NONNULL_BEGIN
1313

@@ -230,6 +230,24 @@ typedef NS_ENUM(NSUInteger, OrderBy) {
230230
*/
231231

232232
- (void)fetchAll:(void (^) (ResponseType type,NSArray<Asset *> * BUILT_NULLABLE_P result,NSError * BUILT_NULLABLE_P error))completionBlock;
233+
234+
/**
235+
This method fetches assets using other fields than UID..
236+
237+
//Obj-C
238+
[assetLib where:(NSString *)field equalTo:(NSObject *)value];
239+
240+
//Swift
241+
assetLib.where("fieldName","value");
242+
243+
This allows filtering assets by specifying the field name and the value to match.
244+
@param field The name of the field to filter by.
245+
@param value The value that the field should match.
246+
*/
247+
- (void)where:(NSString *)field equalTo:(NSObject *)value ;
248+
249+
- (NSDictionary*)getPostParamDictionary;
250+
233251
@end
234252

235253
BUILT_ASSUME_NONNULL_END

Contentstack/AssetLibrary.m

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,25 @@ - (void)cancelRequest {
156156
[self.requestOperation cancel];
157157
}
158158
}
159+
// MARK: - Where Query -
160+
- (NSDictionary*) getPostParamDictionary {
161+
return [self.postParamDictionary copy];
162+
}
163+
164+
- (void)where:(NSString *)field equalTo:(NSObject *)value {
165+
if (field.length == 0 || !value) {
166+
NSLog(@"Field or value cannot be empty");
167+
return;
168+
}
169+
NSMutableDictionary *queryDict = [NSMutableDictionary dictionary];
170+
NSDictionary *existingQuery = self.postParamDictionary[@"query"];
171+
// If an existing query exists, merge it
172+
if (existingQuery) {
173+
[queryDict addEntriesFromDictionary:existingQuery];
174+
}
175+
queryDict[field] = value;
176+
[self.postParamDictionary setObject:queryDict forKey:@"query"];
177+
}
159178

160179

161180
@end

Contentstack/Config.h

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
//
88

99
#import <Foundation/Foundation.h>
10-
#import "ContentstackDefinitions.h"
11-
#import "CSURLSessionDelegate.h"
10+
#import <Contentstack/ContentstackDefinitions.h>
11+
#import <Contentstack/CSURLSessionDelegate.h>
1212
@interface Config : NSObject
1313

1414
/**----------------------------------------------------------------------------------------
@@ -88,4 +88,27 @@
8888
*/
8989
@property (nullable, retain) id<CSURLSessionDelegate> delegate;
9090

91+
92+
93+
/**
94+
Early access features
95+
96+
//Obj-C
97+
Config *config = [[Config alloc] init];
98+
[config setEarlyAccess:@[@"Taxonomy", @"Teams", @"Terms", @"LivePreview"]];
99+
100+
//Swift
101+
let config = Config()
102+
config.setEarlyAccess(["Taxonomy", "Teams", "Terms", "LivePreview"])
103+
104+
*/
105+
@property (nonatomic, strong, nullable) NSArray<NSString *> *setEarlyAccess;
106+
107+
108+
/**
109+
Set early access features
110+
111+
@param setearlyAccess An array of early access feature names
112+
*/
113+
- (NSDictionary<NSString *, NSString *> *)earlyAccessHeaders;
91114
@end

0 commit comments

Comments
 (0)