Skip to content

Commit 1738ceb

Browse files
author
Priyanka Mistry
committed
Update version to v4.1.0
1 parent 226db38 commit 1738ceb

File tree

21 files changed

+250
-23
lines changed

21 files changed

+250
-23
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 = '4.0.0'
3+
s.version = '4.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/.DS_Store

0 Bytes
Binary file not shown.

SDK/iOS/.DS_Store

0 Bytes
Binary file not shown.
6 KB
Binary file not shown.

SDK/iOS/BuiltIO.framework/BuiltIO

2.35 MB
Binary file not shown.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright (c) 2013 raweng. All rights reserved.
77
//
88

9-
// sdk-version: 4.0.0
9+
// sdk-version: 4.1.0
1010

1111
#import <Foundation/Foundation.h>
1212

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,46 @@ Saves an BuiltObject asyncronously if network is unavailable. Resumes when netwo
979979
*/
980980
- (void)saveEventually:(BuiltRequestCompletionHandler)completionBlock;
981981

982+
//MARK: - Import Excel
983+
/**---------------------------------------------------------------------------------------
984+
* @name Import Excel
985+
* ---------------------------------------------------------------------------------------
986+
*/
987+
988+
/**
989+
Imports excel file asyncronously to Built.io Backend servers.
990+
991+
//Obj-C
992+
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
993+
BuiltClass *projectClass = [builtApplication classWithUID:@"project"];
994+
BuiltObject *projectObject = [projectClass object];
995+
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
996+
NSString *documentsDirectory = [paths objectAtIndex:0];
997+
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"person.xlsx"];
998+
[projectObject importFromExcelWithPath:filePath completion:^(BuiltResponseType responseType, NSError * _Nonnull error) {
999+
1000+
}
1001+
1002+
//Swift
1003+
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
1004+
var projectClass:BuiltClass = builtApplication.classWithUID("project")
1005+
var projectObject:BuiltObject = projectClass.object()
1006+
let fileManager = FileManager.default
1007+
if let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask).first {
1008+
let filePath = documentsDirectory.appendingPathComponent("person.xlsx").path
1009+
projectObject.importFromExcel(withPath: filePath, completion: { (response, err) in
1010+
1011+
})
1012+
}
1013+
1014+
@param filePath of a valid excel file we wish to import to.
1015+
@param completionBlock Completion block with params (BuiltResponseType responseType, NSError *error)
1016+
1017+
@note filePath should have readable permission
1018+
1019+
*/
1020+
1021+
- (void)importFromExcelWithPath:(NSString*)filePath completion:(BuiltRequestCompletionHandler)completionBlock;
9821022

9831023
//MARK: - Object delete
9841024
/**---------------------------------------------------------------------------------------

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

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,71 @@ Set a raw query to execute.
10211021
*/
10221022
- (void)exec:(void (^) (BuiltResponseType type, BuiltQueryResult * BUILT_NULLABLE_P result, NSError * BUILT_NULLABLE_P error))completionBlock;
10231023

1024+
//MARK: - Export Excel
1025+
/**---------------------------------------------------------------------------------------
1026+
* @name Export Excel
1027+
* ---------------------------------------------------------------------------------------
1028+
*/
1029+
/**
1030+
exports excel file asyncronously from Built.io Backend server to app
1031+
1032+
//Obj-C
1033+
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
1034+
BuiltClass *projectClass = [builtApplication classWithUID:@"project"];
1035+
BuiltQuery *query = [projectClass query];
1036+
[query exportToExcel:^(BuiltResponseType responseType, NSString * _Nonnull filePath, NSError * _Nonnull error) {
1037+
1038+
}
1039+
1040+
//Swift
1041+
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
1042+
var projectClass:BuiltClass = builtApplication.classWithUID("project")
1043+
let query:BuiltQuery = builtApplication.userQuery()
1044+
query.export { (responseType, filePath, error) in
1045+
1046+
}
1047+
}
1048+
1049+
@param completionBlock Completion block with params (BuiltResponseType responseType, NSString * BUILT_NULLABLE_P filePath, NSError * BUILT_NULLABLE_P error)
1050+
1051+
*/
1052+
- (void)exportToExcel:(void (^) (BuiltResponseType responseType, NSString * BUILT_NULLABLE_P filePath, NSError * BUILT_NULLABLE_P error))completionBlock ;
1053+
1054+
/**
1055+
exports excel file asyncronously from Built.io Backend server to app
1056+
1057+
//Obj-C
1058+
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
1059+
BuiltClass *projectClass = [builtApplication classWithUID:@"project"];
1060+
BuiltQuery *query = [projectClass query];
1061+
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
1062+
NSString *documentsDirectory = [paths objectAtIndex:0];
1063+
NSString *folderPath = [documentsDirectory stringByAppendingPathComponent:@"/UserFolder"];
1064+
[query exportToExcelAtPath:folderPath completion:^(BuiltResponseType responseType, NSString * _Nonnull filePath, NSError * _Nonnull error) {
1065+
1066+
}
1067+
1068+
//Swift
1069+
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
1070+
var projectClass:BuiltClass = builtApplication.classWithUID("project")
1071+
let query:BuiltQuery = projectClass.userQuery()
1072+
let fileManager = FileManager.default
1073+
if let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask).first {
1074+
let folderPath = documentsDirectory.appendingPathComponent("/UserFolder").path
1075+
query.exportToExcel(atPath: folderPath) { (responseType, filePath, error) in
1076+
1077+
}
1078+
}
1079+
1080+
@param folderPath should be valid path with read and write permission where we wish to export to.
1081+
@param completionBlock Completion block with params (BuiltResponseType responseType, NSString * BUILT_NULLABLE_P filePath, NSError * BUILT_NULLABLE_P error)
1082+
1083+
@note folderPath should have read/write permission.
1084+
1085+
*/
1086+
- (void)exportToExcelAtPath:(NSString*)folderPath completion:(void (^) (BuiltResponseType responseType, NSString * BUILT_NULLABLE_P filePath, NSError * BUILT_NULLABLE_P error))completionBlock;
1087+
1088+
10241089
//MARK: Cancel execution -
10251090
/**---------------------------------------------------------------------------------------
10261091
* @name Cancel execution
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)