diff options
| author | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
|---|---|---|
| committer | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
| commit | d6d9a09d505d11148599a95a5be3e1351edbe0ac (patch) | |
| tree | a5f5891983d1ff207e99f683a5e151519cef4980 /libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IHSDKCloudUser.h | |
| parent | e4fb9966e762852bf17f21c8406501d42fae0b61 (diff) | |
Local iHealth SDK, device detail screen, iOS event fixes
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IHSDKCloudUser.h')
| -rw-r--r-- | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IHSDKCloudUser.h | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IHSDKCloudUser.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IHSDKCloudUser.h new file mode 100644 index 0000000..201af0f --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/IHSDKCloudUser.h | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | // | ||
| 2 | // IHSDKCloudUser.h | ||
| 3 | // iHealthDemoCode | ||
| 4 | // | ||
| 5 | // Created by daiqingquan on 16/5/5. | ||
| 6 | // Copyright © 2016年 zhiwei jing. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import <Foundation/Foundation.h> | ||
| 10 | #import "HealthUser.h" | ||
| 11 | |||
| 12 | |||
| 13 | |||
| 14 | @interface IHSDKCloudUser : NSObject | ||
| 15 | |||
| 16 | @property (strong, nonatomic) NSString *thirdUserID; | ||
| 17 | |||
| 18 | |||
| 19 | /** | ||
| 20 | * Initialize IHSDKCloudUser class | ||
| 21 | */ | ||
| 22 | |||
| 23 | +(IHSDKCloudUser*)commandGetSDKUserInstance; | ||
| 24 | |||
| 25 | |||
| 26 | /** User authentication | ||
| 27 | |||
| 28 | * Import Parameters: | ||
| 29 | tempUser included properties: clientID, clientSecret, userAccount | ||
| 30 | userAccount: either email or mobile phone number (mobile phone number is not currently supported yet) | ||
| 31 | clientID & clientSecret: the only identification for users of the SDK, requires registration from iHealth administrator, please email: heguangming@ihealthlabs.com.cn for more information. | ||
| 32 | |||
| 33 | * Return Parameters: | ||
| 34 | * @param userValidationSuccess The return parameters of ’‘userid’, ‘height’, ’clientID’, and ‘clientSecret’ after verification | ||
| 35 | |||
| 36 | The interpretation for the verification: | ||
| 37 | UserAuthen_RegisterSuccess: New-user registration succeeded. | ||
| 38 | UserAuthen_LoginSuccess: User login succeeded. | ||
| 39 | UserAuthen_CombinedSuccess: The user is an iHealth user as well, measurement via SDK has been activated, and the data from the measurement belongs to the user. | ||
| 40 | UserAuthen_TrySuccess: Testing without internet connection succeeded. | ||
| 41 | UserAuthen_InvalidateUserInfo: Userid/clientID/clientSecret verification failed. | ||
| 42 | UserAuthen_SDKInvalidateRight: SDK has not been authorized. | ||
| 43 | UserAuthen_UserInvalidateRight: User has not been authorized. | ||
| 44 | UserAuthen_InternetError: Internet error, verification failed. | ||
| 45 | The measurement via SDK will be operated in the case of 1-4, and will be terminated if any of 5-8 occurs. The interface needs to be re-called after analyzing the return parameters. | ||
| 46 | Notice: when a new user registers via SDK, an ‘iHealth disclaimer’ will pop up automatically, and will require the user to agree in order to continue. SDK applications require an Internet connection; there is 10-day trial period if the SDK cannot connect to the internet, the SDK is fully functional during tryout period, but will be terminated without a working internet connection after 10 days. | ||
| 47 | |||
| 48 | * @param userDeviceAccess | ||
| 49 | ( | ||
| 50 | OpenApiActivity, | ||
| 51 | OpenApiBG, | ||
| 52 | OpenApiBP, | ||
| 53 | OpenApiFood, | ||
| 54 | OpenApiSleep, | ||
| 55 | OpenApiSpO2, | ||
| 56 | OpenApiSport, | ||
| 57 | OpenApiUserInfo, | ||
| 58 | OpenApiWeight | ||
| 59 | ) | ||
| 60 | |||
| 61 | * @param userValidationReturn userID | ||
| 62 | * @paramdisposeValidationErrorBlock: Error code | ||
| 63 | |||
| 64 | */ | ||
| 65 | |||
| 66 | -(void)commandSDKUserValidation:(HealthUser *)tempUser UserDeviceAccess:(DisposeSDKUserDeviceAccess)userDeviceAccess UserValidationSuccess:(DisposeSDKUserValidationSuccess)userValidationSuccess UserValidationReturn:(DisposeSDKUserValidationReturn)userValidationReturn DisposeErrorBlock:(DisposeSDKUserValidationErrorBlock)disposeValidationErrorBlock; | ||
| 67 | |||
| 68 | /** User authentication with AppSecret | ||
| 69 | |||
| 70 | * Import Parameters: | ||
| 71 | appSecret | ||
| 72 | * Return Parameters: | ||
| 73 | * @param userValidationSuccess UserAuthen_AppSecretVerifySuccess | ||
| 74 | |||
| 75 | * @param disposeValidationErrorBlock UserAuthen_AppSecretVerifyFailed | ||
| 76 | |||
| 77 | */ | ||
| 78 | -(void)commandSDKUserValidationWithAppSecret:(NSString *)appSecret UserValidationSuccess:(DisposeSDKUserValidationSuccess)userValidationSuccess DisposeErrorBlock:(DisposeSDKUserValidationErrorBlock)disposeValidationErrorBlock; | ||
| 79 | |||
| 80 | |||
| 81 | /** User authentication with License | ||
| 82 | |||
| 83 | * Import Parameters: | ||
| 84 | |||
| 85 | licenseData | ||
| 86 | |||
| 87 | * Return Parameters: | ||
| 88 | |||
| 89 | * @param userDeviceAccess | ||
| 90 | ( | ||
| 91 | { | ||
| 92 | deviceName = am3s; | ||
| 93 | expiredDate = "2017-05-15"; | ||
| 94 | }, | ||
| 95 | |||
| 96 | ) | ||
| 97 | * @param userValidationSuccess UserAuthen_AppSecretVerifySuccess | ||
| 98 | |||
| 99 | * @param disposeValidationErrorBlock UserAuthen_AppSecretVerifyFailed | ||
| 100 | |||
| 101 | */ | ||
| 102 | -(void)commandSDKUserValidationWithLicense:(NSData *)licenseData UserDeviceAccess:(DisposeSDKUserDeviceAccess)userDeviceAccess UserValidationSuccess:(DisposeSDKUserValidationSuccess)userValidationSuccess DisposeErrorBlock:(DisposeSDKUserValidationErrorBlock)disposeValidationErrorBlock; | ||
| 103 | |||
| 104 | @end | ||
