Skip to content

Commit

Permalink
Updated to version v4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyanka Mistry authored and Priyanka Mistry committed Jul 13, 2018
1 parent 801633e commit 14d5bbc
Show file tree
Hide file tree
Showing 23 changed files with 355 additions and 78 deletions.
2 changes: 1 addition & 1 deletion BuiltIOBackend.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'BuiltIOBackend'
s.version = '4.2.0'
s.version = '4.3.0'
s.summary = 'The BuiltIO Backend helps you to create apps quickly and effortlessly, taking care of all the backend requirements.'

s.description = <<-DESC
Expand Down
Binary file modified SDK/.DS_Store
Binary file not shown.
Binary file modified SDK/iOS/.DS_Store
Binary file not shown.
Binary file modified SDK/iOS/BuiltIO.framework/BuiltIO
Binary file not shown.
150 changes: 150 additions & 0 deletions SDK/iOS/BuiltIO.framework/Headers/BuiltApplication+LocalStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,31 @@ BUILT_ASSUME_NONNULL_BEGIN
//MARK: - Clear Hook
/**
Removes all the records from offline DB.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
[builtApplication clearOfflineData];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
builtApplication.clearOfflineData()
@warning Not supported in watchOS
*/
- (void)clearOfflineData;

/**
Removes all the records from offline DB for the specified classes.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
[builtApplication clearOfflineDataOfOnly:@[@"task"]];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
builtApplication.clearOfflineData(ofOnly: ["task"])
@param onlyClasses Array of class name which need to be removed.
@warning Not supported in watchOS
Expand All @@ -30,7 +49,16 @@ Removes all the records from offline DB.

/**
Removes all the records from offline DB except the specified classes.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
[builtApplication clearOfflineDataExcept:@[@"task"]];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
builtApplication.clearOfflineData(ofExcept: ["task"])
@param exceptClasses Array of class name which need not to be removed.
@warning Not supported in watchOS
*/
Expand All @@ -40,13 +68,33 @@ Removes all the records from offline DB.

/**
Sync all classes with the server. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
[builtApplication sync];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
builtApplication.sync()
@warning Not supported in watchOS
*/
- (void)sync;

/**
Sync all classes with the server from the specified date. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
NSDate *date = [NSDate dateWithTimeIntervalSince1970:10000];
[builtApplication sync:date];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
let date:Date = Date.init(timeIntervalSince1970: 10000)
builtApplication.sync(date)
@param date Date from which sync need to be performed.
@warning Not supported in watchOS
Expand All @@ -55,6 +103,17 @@ Removes all the records from offline DB.

/**
Sync only classes specified with the server. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
NSDate *date = [NSDate dateWithTimeIntervalSince1970:10000];
[builtApplication syncOnly:@[@"task"]];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
let date:Date = Date.init(timeIntervalSince1970: 10000)
builtApplication.syncOnly(["task"])
@param onlyClasses Array of class name which should to be synced.
@warning Not supported in watchOS
Expand All @@ -63,6 +122,17 @@ Removes all the records from offline DB.

/**
Sync only classes specified with the server from the specified date. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
NSDate *date = [NSDate dateWithTimeIntervalSince1970:10000];
[application syncOnly:@[@"task"] date:date];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
let date:Date = Date.init(timeIntervalSince1970: 10000)
builtApplication.syncOnly(["task"], date: date)
@param onlyClasses Array of class name which should to be synced.
@param date Date from which sync need to be performed.
Expand All @@ -72,6 +142,17 @@ Removes all the records from offline DB.

/**
Sync all classes except the specified list with the server. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
NSDate *date = [NSDate dateWithTimeIntervalSince1970:10000];
[builtApplication syncExcept:@[@"project"]];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
let date:Date = Date.init(timeIntervalSince1970: 10000)
builtApplication.syncExcept(["project"])
@param exceptClasses Array of class name which should not be synced.
@warning Not supported in watchOS
Expand All @@ -80,13 +161,82 @@ Removes all the records from offline DB.

/**
Sync all classes except the specified list with the server from the specified date. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
NSDate *date = [NSDate dateWithTimeIntervalSince1970:10000];
[application syncExcept:@[@"project"] date:date];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
let date:Date = Date.init(timeIntervalSince1970: 10000)
builtApplication.syncExcept(["project"], date: date)
@param exceptClasses Array of class name which should not be synced.
@param date Date from which sync need to be performed.
@warning Not supported in watchOS
*/
- (void)syncExcept:(NSArray*)exceptClasses date:(NSDate*)date;

/**
Note: If objects are more than 1000 in a class, then this method will be recommended instead of sync.
Sync all classes with the server with pagination. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
[builtApplication syncWithPagination];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
builtApplication.syncWithPagination()
@warning Not supported in watchOS
*/
- (void)syncWithPagination;

/**
Note: If objects are more than 1000 in a class, then this method will be recommended instead of syncOnly.
Sync only classes specified with the server with pagination. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
[builtApplication syncOnlyWithPagination:@[@"task"]];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
builtApplication.syncOnly(withPagination: ["task"])
@param onlyClasses Array of class name which should to be synced.
@warning Not supported in watchOS
*/
- (void)syncOnlyWithPagination:(NSArray*)onlyClasses ;

/**
Note: If objects are more than 1000 in a class, then this method will be recommended instead of syncExcept.
Sync all classes except the specified list with the server with pagination. If offline is enabled in BuiltConfig it will save all records.
//'blt5d4sample2633b' is a dummy Application API key
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
[builtApplication syncExceptWithPagination:@[@"project"]];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
builtApplication.syncExcept(withPagination: ["project"])
@param exceptClasses Array of class name which should not be synced.
@warning Not supported in watchOS
*/
- (void)syncExceptWithPagination:(NSArray*)exceptClasses;

@end

BUILT_ASSUME_NONNULL_END
Expand Down
4 changes: 2 additions & 2 deletions SDK/iOS/BuiltIO.framework/Headers/BuiltExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ typedef NS_ENUM(NSUInteger, BuiltRequestType) {
@param completion this block will be called after network call if success `responseObject` will contain the response from the extension method or else nil. `error` object will contain error if any.
*/
- (void)execute:(void (^)(BuiltResponseType responseType, id responseObject, NSError *error))completionBlock;
- (void)execute:(void (^)(BuiltResponseType responseType, id BUILT_NULLABLE_P responseObject, NSError * BUILT_NULLABLE_P error))completionBlock;

/**
@abstract Makes a call to an extension function asynchronously.
Expand All @@ -94,7 +94,7 @@ typedef NS_ENUM(NSUInteger, BuiltRequestType) {
@param completion this block will be called after network call if success `responseObject` will contain the response from the extension method or else nil. `error` object will contain error if any.
*/
- (void)executeFunction:(void (^)(BuiltResponseType responseType, id responseObject, NSError *error))completionBlock;
- (void)executeFunction:(void (^)(BuiltResponseType responseType, id BUILT_NULLABLE_P responseObject, NSError * BUILT_NULLABLE_P error))completionBlock;

/**
@abstract set request url and request type.
Expand Down
2 changes: 1 addition & 1 deletion SDK/iOS/BuiltIO.framework/Headers/BuiltIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright (c) 2013 raweng. All rights reserved.
//

// sdk-version: 4.2.0
// sdk-version: beta-4.3.0

#import <Foundation/Foundation.h>

Expand Down
56 changes: 56 additions & 0 deletions SDK/iOS/BuiltIO.framework/Headers/BuiltQueryResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,62 @@ BUILT_ASSUME_NONNULL_BEGIN
@return Returns the count of number of object returned by BuiltQuery.
*/
- (NSInteger)count;
/**
@abstract Count of number of created objects returned by BuiltQuery.
//Obj-C
[projectQuery exec:^(BuiltResponseType type, BuiltQueryResult *result, NSError *error) {
NSInteger createdCount = [result createdCount];
}];
//Swift
projectQuery.exec { (responseType, queryResult!, error!) -> Void in
var createdCount:Int = queryResult.createdCount()
}
@return Returns the count of number of createdCount objects returned by BuiltQuery.
*/
- (NSInteger)createdCount;

/**
@abstract Count of number of updated objects returned by BuiltQuery.
//Obj-C
[projectQuery exec:^(BuiltResponseType type, BuiltQueryResult *result, NSError *error) {
NSInteger updatedCount = [result updatedCount];
}];
//Swift
projectQuery.exec { (responseType, queryResult!, error!) -> Void in
var updatedCount:Int = queryResult.updatedCount()
}
@return Returns the count of number of updated objects returned by BuiltQuery.
*/
- (NSInteger)updatedCount;

/**
@abstract Count of number of deleted objects returned by BuiltQuery.
//Obj-C
[projectQuery exec:^(BuiltResponseType type, BuiltQueryResult *result, NSError *error) {
NSInteger deletedCount = [result deletedCount];
}];
//Swift
projectQuery.exec { (responseType, queryResult!, error!) -> Void in
var deletedCount:Int = queryResult.deletedCount()
}
@return Returns the count of number of deleted objects returned by BuiltQuery.
*/
- (NSInteger)deletedCount;

/**
@abstract Get array of updated objects returned by BuiltDelta.
Expand Down
40 changes: 19 additions & 21 deletions SDK/iOS/BuiltIO.framework/Headers/BuiltUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -639,31 +639,29 @@ Fetch user uid asynchronously by providing twiiter user id
*/

/**
Activate a user asynchronously.
Activate a user asynchronously.
//'bltba9a44506dd9e741' is a uid of an object of inbuilt Application User class
//'bltba9a44506dd9e741' is a uid of an object of inbuilt Application User class
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
BuiltUser *userObject = [builtApplication user];
[userObject activateUserWithUserId:@"bltba9a44506dd9e741" andActivationToken:@"saMpLeaTivAtioNtoKeN" completion:^(BuiltResponseType responseType, NSError *error) {
}];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
var userObject:BuiltUser = builtApplication.user()
userObject.activateUserWithUserId("bltba9a44506dd9e741", andActivationToken:"saMpLeaTivAtioNtoKeN") { (responseType, error!) -> Void in
}
//Obj-C
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
BuiltUser *userObject = [builtApplication user];
[userObject activateUserWithUserId:@"bltba9a44506dd9e741" andActivationToken:@"saMpLeaTivAtioNtoKeN" completion:^(BuiltResponseType responseType, NSError *error) {
@param userId user id of the user to activate
@param token activation token
@param completionBlock Completion block with params (BuiltResponseType responseType, id responseJSON, NSError *error)
}];
//Swift
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
var userObject:BuiltUser = builtApplication.user()
userObject.activateUserWithUserId("bltba9a44506dd9e741", andActivationToken:"saMpLeaTivAtioNtoKeN") { (responseType, error!) -> Void in
}
@param userId user id of the user to activate
@param token activation token
@param completionBlock Completion block with params (BuiltResponseType responseType, id responseJSON, NSError *error)
*/
- (void)activateUserWithUserId:(NSString *)userId
andActivationToken:(NSString *)token
completion:(BuiltRequestCompletionHandler)completionBlock;
- (void)activateUserWithUserId:(NSString *)userId andActivationToken:(NSString *)token completion:(BuiltRequestCompletionHandler)completionBlock;

/**
Deactivates user's account on Built.io Backend asynchronously
Expand Down
Binary file modified SDK/iOS/BuiltIO.framework/_CodeSignature/CodeDirectory
Binary file not shown.
Binary file modified SDK/iOS/BuiltIO.framework/_CodeSignature/CodeRequirements-1
Binary file not shown.
Loading

0 comments on commit 14d5bbc

Please sign in to comment.