APService Class Reference
| Inherits from | NSObject |
| Declared in | APService.h APService.m |
Tasks
-
+ sharedInstance -
– setHostName:contextRoot:customHeaderFields: -
– setHostName:contextRoot:customHeaderFields:portNumber: -
– setAppID:appVersion:hostName:contextRoot:customHeaderFields:portNumber: -
isResetAppDataproperty -
deviceUDIDproperty -
deviceTokenproperty -
appVersionproperty -
appIDproperty -
timeoutForRequestproperty -
hostNameproperty -
contextRootproperty -
isUseSSLproperty -
portNumberproperty -
headersproperty -
tokenIDproperty -
authInfoproperty -
transactionIDproperty -
numberOfLoggingMaximumproperty -
– setLoglevelAt: -
– logError: -
– logMonitor: -
isUsingPushMessageproperty -
– loginByUsername:password:onCompletion:onError: -
– logoutOnCompletion:onError: -
– deviceRegistration:onCompletion:onError:
Properties
appVersion
@abstract @property appVersion
@property (nonatomic, copy) NSString *appVersionDiscussion
@abstract @property appVersion
@discussion
Declared In
APService.hauthInfo
Object that holds information about login user and the groups and roles the user belong to. @property authInfo
@property (nonatomic, strong, readonly) APAuthInfo *authInfoDeclared In
APService.hcontextRoot
ContextRoot Name @property contextRoot
@property (nonatomic, copy) NSString *contextRootDeclared In
APService.hdeviceToken
Gather form APNS. @property deviceToken
@property (nonatomic, copy) NSString *deviceTokenDeclared In
APService.hdeviceUDID
Device UDID object @property device UDID
@property (nonatomic, copy, readonly) NSString *deviceUDIDDeclared In
APService.hheaders
Headers @property headers
@property (nonatomic, copy) NSDictionary *headersDeclared In
APService.hhostName
Host name @property host
@property (nonatomic, copy) NSString *hostNameDeclared In
APService.hisResetAppData
Reset database in server side @property isResetAppData
@property (nonatomic, assign) BOOL isResetAppDataDeclared In
APService.hisUseSSL
Define to indentify application user SSL or not. @property isUseSSL
@property (nonatomic) BOOL isUseSSLDeclared In
APService.hisUsingPushMessage
@abstract
@property (nonatomic, assign) BOOL isUsingPushMessageDiscussion
@abstract
@discussion Authentication with 2 options: isUsingPushMessage is YES and NO. If YES: User developer must be implement deviceRegistration API or authentication will response error If NO: User developer doesn’t need implement deviceRegistration API. Response is NCResponse
Declared In
APService.hnumberOfLoggingMaximum
Define a number of logging in database. @property numberOfLogginMaximum
@property (nonatomic, assign) CGFloat numberOfLoggingMaximumDeclared In
APService.hportNumber
Port. @property portNumber
@property (nonatomic) NSInteger portNumberDeclared In
APService.htimeoutForRequest
Initializes a time out @property timeOut
@property (nonatomic) CGFloat timeoutForRequestDeclared In
APService.hInstance Methods
deviceRegistration:onCompletion:onError:
Register DeviceID
- (void)deviceRegistration:(NSString *)deviceToken onCompletion:(APResponseBlock)completionBlock onError:(APErrorBlock)errorBlockDeclared In
APService.hloginByUsername:password:onCompletion:onError:
Login
- (void)loginByUsername:(NSString *)username password:(NSString *)password onCompletion:(APAuthInfoBlock)completionBlock onError:(APErrorBlock)errorBlockDeclared In
APService.hlogoutOnCompletion:onError:
Logout
- (void)logoutOnCompletion:(APResponseBlock)completionBlock onError:(APErrorBlock)errorBlockDeclared In
APService.hsetAppID:appVersion:hostName:contextRoot:customHeaderFields:portNumber:
Initializes host name, header, port, app ID
- (void)setAppID:(NSString *)appID appVersion:(NSString *)version hostName:(NSString *)host contextRoot:(NSString *)contextRoot customHeaderFields:(NSDictionary *)headers portNumber:(NSInteger)portDeclared In
APService.hsetHostName:contextRoot:customHeaderFields:
Initializes host name and header
- (void)setHostName:(NSString *)hostName contextRoot:(NSString *)contextRoot customHeaderFields:(NSDictionary *)headersDeclared In
APService.h