Skip to content

Commit bf16168

Browse files
author
Priyanka Mistry
committed
Updated to 3.1.0
1 parent ca7858b commit bf16168

27 files changed

+1680
-444
lines changed

BuiltIOBackend.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'BuiltIOBackend'
3-
s.version = '3.0.0'
3+
s.version = '3.1.0'
44
s.summary = 'The BuiltIO Backend helps you to create apps quickly and effortlessly, taking care of all the backend requirements.'
55

66
s.description = <<-DESC

SDK/iOS/BuiltIO.framework/BuiltIO

760 KB
Binary file not shown.

SDK/iOS/BuiltIO.framework/Headers/BuiltApplication.h

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
@class BuiltQuery;
2222
@class BuiltACL;
2323
@class BuiltKeyStore;
24+
@class BuiltUserRoleMapper;
25+
2426

2527
BUILT_ASSUME_NONNULL_BEGIN
2628
/**
@@ -446,6 +448,49 @@ Class for updating installation and for subscribing/unsubscribing for push notif
446448
- (BuiltInstallation *)installationWithUID:(NSString*)installationUID;
447449
#endif
448450

451+
/**---------------------------------------------------------------------------------------
452+
* @name BuiltUserRoleMapper Instance
453+
* ---------------------------------------------------------------------------------------
454+
*/
455+
456+
/**
457+
Represents a new role mapper to create on Built.io Backend.
458+
459+
//'blt5d4sample2633b' is a dummy Application API key
460+
461+
//Obj-C
462+
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
463+
BuiltUserRoleMapper *mapperObject = [builtApplication userRoleMapper];
464+
465+
//Swift
466+
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
467+
var mapperObject:BuiltUserRoleMapper = builtApplication.userRoleMapper()
468+
469+
470+
@return Returns an instance of BuiltUserRoleMapper.
471+
*/
472+
473+
- (BuiltUserRoleMapper *)userRoleMapper;
474+
475+
/**
476+
Represents a role mapper on Built.io Backend
477+
478+
//'blt5d4sample2633b' is a dummy Application API key
479+
//'blt9a1sample5584k' is a dummy mapperUID
480+
481+
//Obj-C
482+
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
483+
BuiltUserRoleMapper *mapperObject = [builtApplication userRoleMapperWithUID:@"blt9a1sample5564k"];
484+
485+
//Swift
486+
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
487+
var mapperObject:BuiltUserRoleMapper = builtApplication.userRoleMapperWithUID("blt9a1sample5584k")
488+
489+
@param mapperUID uid of BuiltUserRoleMapper.
490+
@return Returns an instance of BuiltUserRoleMapper.
491+
*/
492+
- (BuiltUserRoleMapper *)userRoleMapperWithUID:(NSString*)mapperUID;
493+
449494
/**---------------------------------------------------------------------------------------
450495
* @name BuiltRole Instance
451496
* ---------------------------------------------------------------------------------------
@@ -686,10 +731,7 @@ Asynchronously fetches the application info.
686731
687732
}
688733
689-
690-
@param successBlock invoked when request processed sucessfully.
691-
@param errorBlock invoked when request process fails. error parameter contains the error info.
692-
@param finallyBlock invoked when request is finished. Will get invoked after sucess or failure.
734+
@param completionBlock Completion block with params responseType (cache or network), dictionary of application information and error object in any.
693735
*/
694736
- (void)fetchApplicationInfo:(void (^)(BuiltResponseType responseType, NSDictionary * BUILT_NULLABLE_P info, NSError * BUILT_NULLABLE_P error))completionBlock;
695737

SDK/iOS/BuiltIO.framework/Headers/BuiltClass.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
@class BuiltObject;
1313
@class BuiltQuery;
14+
@class BuiltUserRoleMapper;
1415

1516
BUILT_ASSUME_NONNULL_BEGIN
1617
/**

SDK/iOS/BuiltIO.framework/Headers/BuiltGroup.h

Lines changed: 72 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ Removes GroupMultiple to this object
164164
*/
165165
- (void)removeGroupMultiple:(BuiltGroupMultiple*)group;
166166

167-
168167
//MARK: - set values for reference fields
169168

170169
/**---------------------------------------------------------------------------------------
@@ -173,73 +172,73 @@ Removes GroupMultiple to this object
173172
*/
174173

175174
/**
176-
Assigns a set references to a reference field of an object.
175+
Assigns a set references to a reference field of an object.
177176
178-
//Obj-C
179-
BuiltGroup *detailGroup = [BuiltGroup groupWithFieldName:@"details"];
180-
// setting the project reference
181-
[detailGroup setReference:@"bltb6202sample73a1" forKey:@"project"];
182-
183-
//Swift
184-
var detailGroup:BuiltGroup = BuiltGroup(fieldName:"details")
185-
// setting the project reference
186-
detailGroup.setReference("bltb6202sample73a1", forKey:"project")
187-
188-
189-
@param reference This can either be a UID of a referenced object or array of UIDs of a referenced objects.
190-
@param key The uid of the reference field
177+
//Obj-C
178+
BuiltGroup *detailGroup = [BuiltGroup groupWithFieldName:@"details"];
179+
// setting the project reference
180+
[detailGroup setReference:@"bltb6202sample73a1" forKey:@"project"];
181+
182+
//Swift
183+
var detailGroup:BuiltGroup = BuiltGroup(fieldName:"details")
184+
// setting the project reference
185+
detailGroup.setReference("bltb6202sample73a1", forKey:"project")
186+
187+
188+
@param reference This can either be a UID of a referenced object or array of UIDs of a referenced objects.
189+
@param key The uid of the reference field
191190
*/
192191
- (void)setReference:(id)reference forKey:(NSString *)key;
193192

194193
/**
195-
Fires a query on Built.io Backend and all the objects which pass the query condition are being assigned to the reference field.
196-
197-
//Obj-C
198-
BuiltGroup *detailGroup = [BuiltGroup groupWithFieldName:@"details"];
199-
// setting the project reference
200-
[detailGroup setReferenceWhere:@{@"name":@"Super Project #41!"} forKey:@"project"];
194+
Fires a query on Built.io Backend and all the objects which pass the query condition are being assigned to the reference field.
201195
202-
//Swift
203-
var detailGroup:BuiltGroup = BuiltGroup(fieldName:"details")
204-
// setting the project reference
205-
detailGroup.setReferenceWhere(["name":"Super Project #41!"], forKey:"project")
196+
//Obj-C
197+
BuiltGroup *detailGroup = [BuiltGroup groupWithFieldName:@"details"];
198+
// setting the project reference
199+
[detailGroup setReferenceWhere:@{@"name":@"Super Project #41!"} forKey:@"project"];
206200
207-
@param dictionary Object specifying the conditions
208-
@param key The uid of the reference field
201+
//Swift
202+
var detailGroup:BuiltGroup = BuiltGroup(fieldName:"details")
203+
// setting the project reference
204+
detailGroup.setReferenceWhere(["name":"Super Project #41!"], forKey:"project")
205+
206+
@param dictionary Object specifying the conditions
207+
@param key The uid of the reference field
209208
*/
210209
- (void)setReferenceWhere:(NSDictionary *)dictionary forKey:(NSString *)key;
211210

212211
/**
213-
Assigns a set references to a reference field of an object.
212+
Assigns a set references to a reference field of an object.
214213
215-
//Obj-C
216-
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
217-
BuiltClass *projectClass = [builtApplication classWithUID:@"project"];
218-
BuiltObject *projectObject = [projectClass object];
219-
projectObject[@"name"] = @"Super Project #41!";
220-
221-
BuiltGroup *detailGroup = [BuiltGroup groupWithFieldName:@"details"];
222-
// setting the project reference
223-
[detailGroup setReferenceWithObject:projectObject forKey:@"project"];
224-
225-
226-
//Swift
227-
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
228-
var projectClass:BuiltClass = builtApplication.classWithUID("project")
229-
var projectObject:BuiltObject = projectClass.object()
230-
projectObject["name"] = "Super Project #41!"
231-
232-
var detailGroup:BuiltGroup = BuiltGroup(fieldName:"details")
233-
// setting the project reference
234-
detailGroup.setReferenceWithObject(projectObject, forKey:"project")
214+
//Obj-C
215+
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
216+
BuiltClass *projectClass = [builtApplication classWithUID:@"project"];
217+
BuiltObject *projectObject = [projectClass object];
218+
projectObject[@"name"] = @"Super Project #41!";
219+
220+
BuiltGroup *detailGroup = [BuiltGroup groupWithFieldName:@"details"];
221+
// setting the project reference
222+
[detailGroup setReferenceWithObject:projectObject forKey:@"project"];
223+
224+
225+
//Swift
226+
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
227+
var projectClass:BuiltClass = builtApplication.classWithUID("project")
228+
var projectObject:BuiltObject = projectClass.object()
229+
projectObject["name"] = "Super Project #41!"
230+
231+
var detailGroup:BuiltGroup = BuiltGroup(fieldName:"details")
232+
// setting the project reference
233+
detailGroup.setReferenceWithObject(projectObject, forKey:"project")
235234
236-
@param referenceObject This can either an instance of BuiltObject or array of BuiltObject instance.
237-
@param key The uid of the reference field
235+
@param referenceObject This can either an instance of BuiltObject or array of BuiltObject instance.
236+
@param key The uid of the reference field
238237
*/
239238
- (void)setReferenceWithObject:(id)referenceObject forKey:(NSString *)key;
240239

241240
/**
242-
Use this method only when the values of the fields inside referenced object are to be changed while creating a new object.
241+
Use this method only when the values of the fields inside referenced object is to be changed while creating a new object.
243242
244243
//ObjC
245244
BuiltGroup *detailGroup = [BuiltGroup groupWithFieldName:@"details"];
@@ -256,8 +255,30 @@ Use this method only when the values of the fields inside referenced object are
256255
@param conditionDictionary A check will be performed, whether any object has the key value pair(s) supplied in the dictionary in the reference field
257256
@param replaceDictionary New key value pairs for the fields inside the referenced object
258257
*/
258+
259259
- (void)addUpsertForReferenceField:(NSString *)referenceField condition:(NSDictionary *)conditionDictionary replaceWith:(NSDictionary *)replaceDictionary;
260260

261+
/**
262+
Use this method only when the values of the fields inside referenced objects are to be changed while creating a new object.
263+
264+
//ObjC
265+
BuiltGroup *detailGroup = [BuiltGroup groupWithFieldName:@"details"];
266+
267+
[detailGroup addUpsertForMultipleReferenceField:@"project" condition:@{@"name":@"Super Project #41"} replaceWith:@{@"name":@"Super Project A", @"description":@"New project"}];
268+
269+
//Swift
270+
var detailGroup:BuiltGroup = BuiltGroup(fieldName:"details")
271+
272+
detailGroup.addUpsertForMultipleReferenceField("project", condition:["name":"Super Project #41"], replaceWith:["name":"Super Project A", "description":"New project"])
273+
274+
275+
@param referenceField Reference uid on which UPSERT is to be performed
276+
@param conditionDictionary A check will be performed, whether any object has the key value pair(s) supplied in the dictionary in the reference field
277+
@param replaceDictionary New key value pairs for the fields inside the referenced object
278+
*/
279+
280+
- (void)addUpsertForMultipleReferenceField:(NSString *)referenceField condition:(NSDictionary *)conditionDictionary replaceWith:(NSDictionary *)replaceDictionary;
281+
261282

262283
//MARK: - operations on fields of multiple type
263284

SDK/iOS/BuiltIO.framework/Headers/BuiltIO.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// Copyright (c) 2013 raweng. All rights reserved.
77
//
88

9-
// sdk-version: 3.0.0
10-
// api-version: 3.0
9+
// sdk-version: 3.1.0
10+
// api-version: 3.1
1111

1212
#import <Foundation/Foundation.h>
1313

@@ -28,6 +28,7 @@ FOUNDATION_EXPORT const unsigned char Built_IOVersionString[];
2828
#import <BuiltIO/BuiltLocation.h>
2929
#import <BuiltIO/BuiltRole.h>
3030
#import <BuiltIO/BuiltUser.h>
31+
#import <BuiltIO/BuiltUserRoleMapper.h>
3132
#import <BuiltIO/BuiltUpload.h>
3233
#import <BuiltIO/BuiltACL.h>
3334
#import <BuiltIO/BuiltObject.h>

SDK/iOS/BuiltIO.framework/Headers/BuiltInstallation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,4 +446,4 @@ Disable installation
446446

447447
BUILT_ASSUME_NONNULL_END
448448

449-
#endif
449+
#endif

SDK/iOS/BuiltIO.framework/Headers/BuiltLocation.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ Gets the current location and returns as in `BuiltLocation` object.
9393
var longitude:Double = BuiltLocation.longitude
9494
}
9595
96-
@param successBlock will have the `BuiltLocation` object with current longitude and latitude.
97-
@param errorBlock will have an `NSError` object in case the current location was not available.
96+
@param completionBlock Completion block with params current location and error object in any.
9897
*/
9998
+ (void)currentLocationOnCompletion:(void (^) (BuiltLocation * BUILT_NULLABLE_P currentLocation, NSError * BUILT_NULLABLE_P error))completionBlock;
10099

0 commit comments

Comments
 (0)