Skip to content

Commit 226db38

Browse files
committed
version updated to 4.0.0
1 parent e869734 commit 226db38

File tree

23 files changed

+318
-56
lines changed

23 files changed

+318
-56
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.2.0'
3+
s.version = '4.0.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

-1.12 MB
Binary file not shown.

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,27 @@ SSL state of Built.io Backend api server.
176176
@property (nonatomic, assign, getter=isOffline) BOOL offline;
177177
#endif
178178

179+
180+
//MARK: - Persist refresh token
181+
182+
/**---------------------------------------------------------------------------------------
183+
* @name Persist refresh token
184+
* ---------------------------------------------------------------------------------------
185+
*/
186+
/**
187+
Sets whether the refresh token is to persist or not in user session
188+
189+
//Obj-C
190+
BuiltConfig *config = [[BuiltConfig alloc] init];
191+
config.persistRefreshToken = NO;
192+
193+
//Swift
194+
var config:BuiltConfig = BuiltConfig()
195+
config.persistRefreshToken = false
196+
197+
*/
198+
@property (nonatomic, assign, getter=isPersistRefreshTokenEnabled) BOOL persistRefreshToken;
199+
179200
@end
180201

181202
BUILT_ASSUME_NONNULL_END

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ FOUNDATION_EXPORT NSInteger const kErrorRealtimePresenceRequestFailed;//507
9191
FOUNDATION_EXPORT NSInteger const kErrorRealtimeStateSetFailed;//508
9292
FOUNDATION_EXPORT NSInteger const kErrorRealtimeNotEnabled;//550
9393

94+
//>800 SSO Error
95+
FOUNDATION_EXPORT NSInteger const kErrorSSOLogin; //800
96+
9497
//>900 TwitterAcccount
9598
FOUNDATION_EXPORT NSInteger const kErrorTwitterAccountNotFound;//900
9699
FOUNDATION_EXPORT NSInteger const kErrorTwitterAccountPremissionDenied;//901

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: 3.2.0
9+
// sdk-version: 4.0.0
1010

1111
#import <Foundation/Foundation.h>
1212

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

Lines changed: 100 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,32 @@ BUILT_ASSUME_NONNULL_BEGIN
142142

143143

144144
/**
145-
@abstract The authtoken after logging in
145+
@abstract The accessToken after logging in
146146
147-
//Obj-C
148-
NSString *authToken = userObject.authtoken;
149-
150-
//Swift
151-
var authToken:String = userObject.authtoken
147+
//Obj-C
148+
NSString *accessToken = userObject.accessToken;
149+
150+
//Swift
151+
var accessToken:String = userObject.accessToken
152+
153+
154+
@discussion The accessToken after logging in
155+
*/
156+
@property (nullable, nonatomic, copy, readonly) NSString *accessToken;
157+
158+
/**
159+
@abstract The refreshToken after logging in
160+
161+
//Obj-C
162+
NSString *refreshToken = userObject.refreshToken;
163+
164+
//Swift
165+
var refreshToken:String = userObject.refreshToken
152166
153167
154-
@discussion The authtoken after logging in
168+
@discussion The refreshToken after logging in
155169
*/
156-
@property (nullable, nonatomic, copy, readonly) NSString *authtoken;
170+
@property (nullable, nonatomic, copy, readonly) NSString *refreshToken;
157171

158172

159173
/**
@@ -729,6 +743,84 @@ Updates the existing user asynchronously
729743

730744
- (void)saveAsDraftEventually:(BuiltRequestCompletionHandler)completionBlock BUILTIO_DEPRECATED("Not for BuiltUser");
731745

746+
//MARK: - SSO Login
747+
/**---------------------------------------------------------------------------------------
748+
* @name SSO Login
749+
* ---------------------------------------------------------------------------------------
750+
*/
751+
752+
#if TARGET_OS_IOS
753+
/**
754+
Asynchronously login using SSO token
755+
756+
//Obj-C
757+
BuiltApplication *builtApplication = [Built applicationWithAPIKey:@"blt5d4sample2633b"];
758+
BuiltUser *ssoUser = [builtApplication user];
759+
[ssoUser loginWithSSO:^(BuiltResponseType responseType, NSError *error) {
760+
761+
}];
762+
763+
//Swift
764+
var builtApplication:BuiltApplication = Built.applicationWithAPIKey("blt5d4sample2633b")
765+
var ssoUser:BuiltUser = builtApplication.user()
766+
ssoUser.loginWithSSO { (responseType, error!) -> Void in
767+
768+
}
769+
770+
@param completionBlock Completion block with params (BuiltResponseType responseType, id responseJSON, NSError *error)
771+
*/
772+
- (void)loginWithSSO:(BuiltRequestCompletionHandler)completionBlock;
773+
#endif
774+
775+
776+
//MARK: - Refresh access token
777+
/**---------------------------------------------------------------------------------------
778+
* @name Refresh access token
779+
* ---------------------------------------------------------------------------------------
780+
*/
781+
782+
/**
783+
Asynchronously refresh the user access_token from server using refresh_token
784+
785+
//Obj-C
786+
BuiltUser *userObject = [builtApplication user];
787+
[userObject refreshAccessToken:@"blt_sample_refresh_token" completion:^(BuiltResponseType responseType, NSError *error) {
788+
789+
}];
790+
791+
//Swift
792+
var userObject:BuiltUser = builtApplication.user()
793+
refreshAccessToken("blt_sample_refresh_token") { (responseType, error!) -> Void in
794+
795+
}
796+
797+
@param refreshToken refresh_token
798+
@param completionBlock Completion block with params (BuiltResponseType responseType, id responseJSON, NSError *error)
799+
800+
@note If persistRefreshToken property is true in BuiltConfig, you have to use this method for refreshing the user access_token.
801+
*/
802+
- (void)refreshAccessToken:(NSString *)refreshToken completion:(BuiltRequestCompletionHandler)completionBlock;
803+
804+
/**
805+
Asynchronously refresh the user access_token from server using refresh_token
806+
807+
//Obj-C
808+
BuiltUser *userObject = [builtApplication user];
809+
[userObject refreshAccessToken:^(BuiltResponseType responseType, NSError *error) {
810+
811+
}];
812+
813+
//Swift
814+
var userObject:BuiltUser = builtApplication.user()
815+
refreshAccessToken { (responseType, error!) -> Void in
816+
817+
}
818+
819+
@param completionBlock Completion block with params (BuiltResponseType responseType, id responseJSON, NSError *error)
820+
821+
@note If persistRefreshToken property is false in BuiltConfig, you have to use this method for refreshing the user access_token.
822+
*/
823+
- (void)refreshAccessToken:(BuiltRequestCompletionHandler)completionBlock;
732824

733825
@end
734826

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)