Commit c57a80d5047332e31fc18f157c05829f011e4cc7
1 parent
ce5581eb
增加token设置
Showing
10 changed files
with
490 additions
and
2 deletions
CNLiveUserSystemDemo.xcodeproj/project.pbxproj
| ... | ... | @@ -981,7 +981,7 @@ |
| 981 | 981 | "-fobjc-arc", |
| 982 | 982 | "-ObjC", |
| 983 | 983 | ); |
| 984 | - PRODUCT_BUNDLE_IDENTIFIER = "shixunzhongguo-cnlive8"; | |
| 984 | + PRODUCT_BUNDLE_IDENTIFIER = "shixunzhongguo-cnlive"; | |
| 985 | 985 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 986 | 986 | PROVISIONING_PROFILE = ""; |
| 987 | 987 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| ... | ... | @@ -1014,7 +1014,7 @@ |
| 1014 | 1014 | "-fobjc-arc", |
| 1015 | 1015 | "-ObjC", |
| 1016 | 1016 | ); |
| 1017 | - PRODUCT_BUNDLE_IDENTIFIER = "shixunzhongguo-cnlive8"; | |
| 1017 | + PRODUCT_BUNDLE_IDENTIFIER = "shixunzhongguo-cnlive"; | |
| 1018 | 1018 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 1019 | 1019 | PROVISIONING_PROFILE = ""; |
| 1020 | 1020 | PROVISIONING_PROFILE_SPECIFIER = ""; | ... | ... |
CNLiveUserSystemDemo/AppDelegate.m
| ... | ... | @@ -28,6 +28,7 @@ |
| 28 | 28 | [CNLiveUserSystemCenter setAppId:AppId appKey:AppKey appSecret:AppSceret]; |
| 29 | 29 | |
| 30 | 30 | [CNLiveUserSystemCenter setFromID:@"ffylTest"]; |
| 31 | + [CNLiveUserSystemCenter setToken:@"gV0hemajp4QbLMbiKQbg2kHtC2cqIswS9insV7CPHrT085UAHXQWoHn9KcoUZLTa"]; | |
| 31 | 32 | [WXApi registerApp:WeChatAppKey]; |
| 32 | 33 | [WeiboSDK enableDebugMode:YES]; |
| 33 | 34 | [WeiboSDK registerApp:SinaAppKey]; | ... | ... |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserManager.h
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserSystemCenter.h
| ... | ... | @@ -23,6 +23,14 @@ |
| 23 | 23 | */ |
| 24 | 24 | + (void)setAppId:(NSString *)appId appKey:(NSString *)appKey appSecret:(NSString *)appSecret isTestEnvironment:(BOOL)isTestEnvironment; |
| 25 | 25 | |
| 26 | + | |
| 27 | +/** | |
| 28 | + 授权令牌 | |
| 29 | + | |
| 30 | + @param token 授权令牌 | |
| 31 | + */ | |
| 32 | ++ (void)setToken:(NSString *)token; | |
| 33 | + | |
| 26 | 34 | /** |
| 27 | 35 | 用户ID |
| 28 | 36 | ... | ... |
CNLiveUserSystemDemo/CNLiveUserSystemSDK/CNLiveUserSystemCenter.m
| ... | ... | @@ -50,6 +50,11 @@ |
| 50 | 50 | [[CNLiveUserManager manager] addObserver]; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | ++ (void)setToken:(NSString *)token | |
| 54 | +{ | |
| 55 | + [CNLiveUserManager manager].token = token; | |
| 56 | +} | |
| 57 | + | |
| 53 | 58 | + (void)setUserId:(NSString *)userId |
| 54 | 59 | { |
| 55 | 60 | [CNLiveUserManager manager].userId = userId; |
| ... | ... | @@ -331,6 +336,9 @@ |
| 331 | 336 | NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; |
| 332 | 337 | if ([userDefaults objectForKey:@"CNLiveAuthToken"]) { |
| 333 | 338 | return [userDefaults objectForKey:@"CNLiveAuthToken"]; |
| 339 | + }else if ([CNLiveUserManager manager].token) | |
| 340 | + { | |
| 341 | + return [CNLiveUserManager manager].token; | |
| 334 | 342 | } |
| 335 | 343 | return @""; |
| 336 | 344 | } | ... | ... |
Products/CNLiveUserSystemSDK.framework/CNLiveUserSystemSDK
0 → 100644
No preview for this file type
Products/CNLiveUserSystemSDK.framework/Headers/CNLiveUserSystemCenter.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveUserSystemCenter.h | |
| 3 | +// CNLiveUserSystemDemo | |
| 4 | +// | |
| 5 | +// Created by iOS on 16/9/12. | |
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | +#import "CNLiveUserSystemTypeDef.h" | |
| 11 | +#import <UIKit/UIKit.h> | |
| 12 | + | |
| 13 | +@interface CNLiveUserSystemCenter : NSObject | |
| 14 | + | |
| 15 | +/** | |
| 16 | + @abstract 初始化 | |
| 17 | + @param appId 注册成功获得应用ID | |
| 18 | + @param appKey 注册成功获得应用key | |
| 19 | + @param appSecret 注册成功获得应用secret | |
| 20 | + @param isTestEnvironment 测试环境开关 | |
| 21 | + @warning 必传参数 | |
| 22 | + 必须在 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 方法中调用 | |
| 23 | + */ | |
| 24 | + + (void)setAppId:(NSString *)appId appKey:(NSString *)appKey appSecret:(NSString *)appSecret isTestEnvironment:(BOOL)isTestEnvironment; | |
| 25 | + | |
| 26 | +/** | |
| 27 | + 用户ID | |
| 28 | + | |
| 29 | + @param userId 用户ID | |
| 30 | + */ | |
| 31 | ++ (void)setUserId:(NSString *)userId; | |
| 32 | + | |
| 33 | +/** | |
| 34 | + 渠道ID | |
| 35 | + | |
| 36 | + @param fromID 渠道ID | |
| 37 | + */ | |
| 38 | ++ (void)setFromID:(NSString *)fromID; | |
| 39 | + | |
| 40 | +/** | |
| 41 | + @abstract 初始化 | |
| 42 | + @param appId 注册成功获得应用ID | |
| 43 | + @param appKey 注册成功获得应用key | |
| 44 | + @param appSecret 注册成功获得应用secret | |
| 45 | + @warning 必传参数 | |
| 46 | + 必须在 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 方法中调用 | |
| 47 | + *此方法环境默认为正式环境,建议使用如下方法初始化. | |
| 48 | + + (void)setAppId:(NSString *)appId appKey:(NSString *)appKey appSecret:(NSString *)appSecret isTestEnvironment:(BOOL)isTestEnvironment; | |
| 49 | + | |
| 50 | + */ | |
| 51 | ++ (void)setAppId:(NSString *)appId appKey:(NSString *)appKey appSecret:(NSString *)appSecret; | |
| 52 | + | |
| 53 | +/** | |
| 54 | + @abstract 注册 | |
| 55 | + @param userName 邮箱或手机 | |
| 56 | + @param password 密码 | |
| 57 | + @param verificationCode 手机验证码(手机号注册时必填) | |
| 58 | + @param invitationCode 邀请码(非必填) | |
| 59 | + @param frmId 渠道ID(非必填) | |
| 60 | + @param success 成功回调 | |
| 61 | + @param failure 失败回调 | |
| 62 | + */ | |
| 63 | ++ (void)registerWithUserName:(NSString *)userName password:(NSString *)password verificationCode:(NSString *)verificationCode invitationCode:(NSString *)invitationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 64 | + | |
| 65 | + | |
| 66 | +/** | |
| 67 | + @abstract 第三方登录 | |
| 68 | + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq 3:weixin 4:renren 注:如qq登录,plat=@"2") | |
| 69 | + @param thirdPartyId 第三方用户ID | |
| 70 | + @param nickName 用户昵称 | |
| 71 | + @param gender 性别,m:男、f:女、n:未知(非必填) | |
| 72 | + @param location 用户所在地(非必填) | |
| 73 | + @param faceUrl 头像,约100*100(非必填) | |
| 74 | + @param frmId 渠道ID(非必填) | |
| 75 | + @param success 成功回调 | |
| 76 | + @param failure 失败回调 | |
| 77 | + */ | |
| 78 | ++ (void)thirdPartyLoginWithThirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId nickName:(NSString *)nickName gender:(NSString *)gender location:(NSString *)location faceUrl:(NSString *)faceUrl frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 79 | + | |
| 80 | + | |
| 81 | +/** | |
| 82 | + @abstract 快捷登录(旧) | |
| 83 | + @param userName 手机号 | |
| 84 | + @param verificationCode 验证码 | |
| 85 | + @param frmId 渠道ID(非必填) | |
| 86 | + @param success 成功回调 | |
| 87 | + @param failure 失败回调 | |
| 88 | + */ | |
| 89 | ++ (void)shortcutLoginWithUserName:(NSString *)userName verificationCode:(NSString *)verificationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 90 | + | |
| 91 | +/** | |
| 92 | + @abstract 快捷登录(新) | |
| 93 | + @param userName 手机号 | |
| 94 | + @param countryCode 手机号国家码 | |
| 95 | + @param verificationCode 验证码 | |
| 96 | + @param frmId 渠道ID(非必填) | |
| 97 | + @param success 成功回调 | |
| 98 | + @param failure 失败回调 | |
| 99 | + */+ (void)shortcutLoginWithUserName:(NSString *)userName countryCode:(NSString *)countryCode verificationCode:(NSString *)verificationCode frmId:(NSString *)frmId success:(void (^)(id))success failure :(void (^)(NSDictionary *))failure; | |
| 100 | + | |
| 101 | +/** | |
| 102 | + @abstract 登录 | |
| 103 | + @param userName 手机号或邮箱 | |
| 104 | + @param password 密码 | |
| 105 | + @param frmId 渠道ID(非必填) | |
| 106 | + @param success 成功回调 | |
| 107 | + @param failure 失败回调 | |
| 108 | + */ | |
| 109 | ++ (void)loginWithUserName:(NSString *)userName password:(NSString *)password frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 110 | + | |
| 111 | + | |
| 112 | +/** | |
| 113 | + @abstract 发送验证码(旧) | |
| 114 | + @param mobile 手机号 | |
| 115 | + @param type 发送验证码类型(详见VerificationCodeType) | |
| 116 | + @param success 成功回调 | |
| 117 | + @param failure 失败回调 | |
| 118 | + */ | |
| 119 | ++ (void)verificationCodeType:(VerificationCodeType)type mobile:(NSString *)mobile success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 120 | + | |
| 121 | +/** | |
| 122 | + @abstract 发送验证码(新) | |
| 123 | + @param type 发送验证码类型(详见VerificationCodeType) | |
| 124 | + @param mobile 手机号 | |
| 125 | + @param countryCode 手机号国家码 | |
| 126 | + @param success 成功回调 | |
| 127 | + @param failure 失败回调 | |
| 128 | + */ | |
| 129 | ++ (void)verificationCodeType:(VerificationCodeType)type mobile:(NSString *)mobile countryCode:(NSString *)countryCode success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 130 | + | |
| 131 | + | |
| 132 | +/** | |
| 133 | + @abstract 更新用户附加信息 | |
| 134 | + @param uid 用户ID | |
| 135 | + @param extInfo 扩展信息(格式由对方自己组织,平台只负责存储和原样读取,NSString类型) | |
| 136 | + @param success 成功回调 | |
| 137 | + @param failure 失败回调 | |
| 138 | + */ | |
| 139 | ++ (void)updateOtherInfoWithUid:(NSString *)uid extInfo:(NSString *)extInfo success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 140 | + | |
| 141 | + | |
| 142 | +/** | |
| 143 | + @abstract 修改用户单项信息 | |
| 144 | + @param type 修改类型(nickName-昵称,gender-性别,email-邮箱, location-联系方式(地址)) | |
| 145 | + @param uid 用户ID | |
| 146 | + @param info 对应的信息(注gender对应f/m/n) | |
| 147 | + @param success 成功回调 | |
| 148 | + @param failure 失败回调 | |
| 149 | + */ | |
| 150 | ++ (void)modifyUserInfoType:(UserInfoType)type uid:(NSString *)uid modifyInfo:(NSString *)info success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 151 | + | |
| 152 | + | |
| 153 | +/** | |
| 154 | + @abstract 更新手机号(旧) | |
| 155 | + @param uid 用户ID | |
| 156 | + @param mobile 手机号 | |
| 157 | + @param verificationCode 验证码 | |
| 158 | + @param success 成功回调 | |
| 159 | + @param failure 失败回调 | |
| 160 | + */ | |
| 161 | ++ (void)updateMobileWithUid:(NSString *)uid mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 162 | + | |
| 163 | +/** | |
| 164 | + @abstract 更新手机号(新) | |
| 165 | + @param uid 用户ID | |
| 166 | + @param mobile 手机号 | |
| 167 | + @param countryCode 手机号国家码 | |
| 168 | + @param verificationCode 验证码 | |
| 169 | + @param success 成功回调 | |
| 170 | + @param failure 失败回调 | |
| 171 | + */ | |
| 172 | ++(void)updateMobileWithUid:(NSString *)uid mobile:(NSString *)mobile countryCode:(NSString *)countryCode verificationCode:(NSString *)verificationCode success:(void (^)(id))success failure:(void (^)(NSDictionary *))failure; | |
| 173 | + | |
| 174 | +/** | |
| 175 | + @abstract 绑定第三方账号 | |
| 176 | + @param uid 用户ID | |
| 177 | + @param plat 第三方平台编号(如platform: 1:sina weibo 2:qq 3:weixin 4:renren 注:如绑定qq,thirdPartyPlat = @"2") | |
| 178 | + @param thirdPartyId 第三方用户ID | |
| 179 | + @param success 成功回调 | |
| 180 | + @param failure 失败回调 | |
| 181 | + */ | |
| 182 | ++ (void)bindingThirdPartyWithUid:(NSString *)uid thirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 183 | + | |
| 184 | + | |
| 185 | +/** | |
| 186 | + @abstract 修改密码(通过手机号修改) | |
| 187 | + @param mobile 手机号 | |
| 188 | + @param verificationCode 验证码 | |
| 189 | + @param newPassword 新密码 | |
| 190 | + @param success 成功回调 | |
| 191 | + @param failure 失败回调 | |
| 192 | + */ | |
| 193 | ++ (void)changePasswordWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode newPassword:(NSString *)newPassword success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 194 | + | |
| 195 | + | |
| 196 | +/** | |
| 197 | + @abstract 上传头像 | |
| 198 | + @param uid 用户ID | |
| 199 | + @param icon 头像 (图片质量 0.5) | |
| 200 | + @param success 成功回调 | |
| 201 | + @param failure 失败回调 | |
| 202 | + */ | |
| 203 | ++ (void)uploadIconWithUid:(NSString *)uid icon:(UIImage *)icon success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 204 | + | |
| 205 | +/** | |
| 206 | + @abstract 上传头像 新增 | |
| 207 | + @param uid 用户ID | |
| 208 | + @param compressionQuality 头像质量 0-1 Default 0.5 | |
| 209 | + @param icon 头像 | |
| 210 | + @param success 成功回调 | |
| 211 | + @param failure 失败回调 | |
| 212 | + | |
| 213 | + */ | |
| 214 | ++ (void)uploadIconWithUid:(NSString *)uid icon:(UIImage *)icon compressionQuality:(CGFloat)compressionQuality success:(void (^)(id))success failure:(void (^)(NSDictionary *))failure; | |
| 215 | + | |
| 216 | +/** | |
| 217 | + @abstract 查询用户信息 | |
| 218 | + @param uid 用户ID | |
| 219 | + @param srcUid 被查询用户ID | |
| 220 | + @param success 成功回调 | |
| 221 | + @param failure 失败回调 | |
| 222 | + */ | |
| 223 | ++ (void)queryUserInfoWithUid:(NSString *)uid srcUid:(NSString *)srcUid success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 224 | + | |
| 225 | + | |
| 226 | +/** | |
| 227 | + @abstract 查询多条用户信息 | |
| 228 | + @param uid 用户ID | |
| 229 | + @param srcUids 被查询用户IDs | |
| 230 | + @param success 成功回调 | |
| 231 | + @param failure 失败回调 | |
| 232 | + */ | |
| 233 | ++ (void)queryMoreUserInfosWithUid:(NSString *)uid srcUids:(NSArray *)srcUids success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 234 | + | |
| 235 | + | |
| 236 | +/** | |
| 237 | + @abstract 用户反馈 | |
| 238 | + @param contentId 举报内容ID | |
| 239 | + @param message 举报内容(app自己组织-不能带特殊字符&号等) | |
| 240 | + @param success 成功回调 | |
| 241 | + @param failure 失败回调 | |
| 242 | + */ | |
| 243 | ++ (void)feedbackWithContentId:(NSString *)contentId message:(NSString *)message success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 244 | + | |
| 245 | + | |
| 246 | +/** | |
| 247 | + 通过邮箱修改密码 | |
| 248 | + | |
| 249 | + @param email 邮箱 | |
| 250 | + @param newPwd 新密码 | |
| 251 | + @param success 成功回调 | |
| 252 | + @param failure 失败回调 | |
| 253 | + */ | |
| 254 | ++ (void)modifyPwdWithEmail:(NSString *)email newPwd:(NSString *)newPwd success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | |
| 255 | + | |
| 256 | + | |
| 257 | +/** | |
| 258 | + 通过原密码修改密码 | |
| 259 | + | |
| 260 | + @param uid 用户ID | |
| 261 | + @param pwd 原密码 | |
| 262 | + @param newPwd 新密码 | |
| 263 | + @param success 成功回调 | |
| 264 | + @param failure 失败回调 | |
| 265 | + */ | |
| 266 | ++ (void)oldPwdChangePasswordWithUid:(NSString *)uid pwd:(NSString *)pwd newPwd:(NSString *)newPwd success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | |
| 267 | + | |
| 268 | + | |
| 269 | +/** | |
| 270 | + 注册前校验手机验证码(旧) | |
| 271 | + | |
| 272 | + @param mobile 手机号 | |
| 273 | + @param verificationCode 验证码 | |
| 274 | + @param success 成功回调 | |
| 275 | + @param failure 失败回调 | |
| 276 | + */ | |
| 277 | ++ (void)registerCheckVerificationCodeWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | |
| 278 | + | |
| 279 | +/** | |
| 280 | + 注册前校验手机验证码(新) | |
| 281 | + | |
| 282 | + @param mobile 手机号 | |
| 283 | + @param countryCode 手机号国家码 | |
| 284 | + @param verificationCode 验证码 | |
| 285 | + @param success 成功回调 | |
| 286 | + @param failure 失败回调 | |
| 287 | + */ | |
| 288 | ++ (void)registerCheckVerificationCodeWithMobile:(NSString *)mobile countryCode:(NSString *)countryCode verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | |
| 289 | + | |
| 290 | +/** | |
| 291 | + 快捷登录前校验手机验证码(旧) | |
| 292 | + | |
| 293 | + @param mobile 手机号 | |
| 294 | + @param verificationCode 验证码 | |
| 295 | + @param success 成功回调 | |
| 296 | + @param failure 失败回调 | |
| 297 | + */ | |
| 298 | ++ (void)shortcutLoginCheckVerificationCodeWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | |
| 299 | + | |
| 300 | +/** | |
| 301 | + 快捷登录前校验手机验证码(新) | |
| 302 | + | |
| 303 | + @param mobile 手机号 | |
| 304 | + @param countryCode 手机号国家码 | |
| 305 | + @param success 成功回调 | |
| 306 | + @param failure 失败回调 | |
| 307 | + */ | |
| 308 | ++ (void)shortcutLoginCheckVerificationCodeWithMobile:(NSString *)mobile countryCode:(NSString *)countryCode verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | |
| 309 | + | |
| 310 | +/** | |
| 311 | + 验证第三方账号是否注册,若注册则直接登录返回用户信息,若未注册返回errorCode | |
| 312 | + | |
| 313 | + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq 3:weixin 4:renren 注:如qq登录,plat=@"2") | |
| 314 | + @param thirdPartyId 第三方用户ID | |
| 315 | + @param frmId 渠道ID(非必填) | |
| 316 | + @param success 成功回调 | |
| 317 | + @param failure 失败回调 | |
| 318 | + */ | |
| 319 | ++ (void)thirdPartyCheckLoginWithThirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | |
| 320 | + | |
| 321 | + | |
| 322 | +/** | |
| 323 | + 第三方注册强制绑定手机号登录: 手机号+密码+验证码+三方账号 | |
| 324 | + | |
| 325 | + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq 3:weixin 4:renren 注:如qq登录,plat=@"2") | |
| 326 | + @param thirdPartyId 第三方用户ID | |
| 327 | + @param nickName 用户昵称 | |
| 328 | + @param gender 性别,m:男、f:女、n:未知(非必填) | |
| 329 | + @param location 用户所在地(非必填) | |
| 330 | + @param faceUrl 头像,约100*100(非必填) | |
| 331 | + @param mobile 手机号 | |
| 332 | + @param verificationCode 验证码 (验证码类型为快捷登录VerificationCodeTypeShortcutLogin) | |
| 333 | + @param pawd 注册密码 | |
| 334 | + @param frmId 渠道ID(非必填) | |
| 335 | + @param success 成功回调 | |
| 336 | + @param failure 失败回调 | |
| 337 | + */ | |
| 338 | ++ (void)thirdPartyBindMobileLoginWithThirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId nickName:(NSString *)nickName gender:(NSString *)gender location:(NSString *)location faceUrl:(NSString *)faceUrl mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode pawd:(NSString *)pawd frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | |
| 339 | + | |
| 340 | + | |
| 341 | +/** | |
| 342 | + * 获取SDK版本号 v2.2.0 | |
| 343 | + */ | |
| 344 | ++ (NSString *)getVersion; | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | +@end | ... | ... |
Products/CNLiveUserSystemSDK.framework/Headers/CNLiveUserSystemTypeDef.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveUserSystemTypeDef.h | |
| 3 | +// CNLiveUserSystemDemo | |
| 4 | +// | |
| 5 | +// Created by iOS on 16/9/12. | |
| 6 | +// Copyright © 2016年 zhulin. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#ifndef CNLiveUserSystemTypeDef_h | |
| 10 | +#define CNLiveUserSystemTypeDef_h | |
| 11 | + | |
| 12 | +//获取验证码 | |
| 13 | +typedef NS_ENUM(NSUInteger, VerificationCodeType) { | |
| 14 | + VerificationCodeTypeShortcutLogin = 0, //快捷登录 | |
| 15 | + VerificationCodeTypeRegister, //注册或修改手机号 | |
| 16 | + VerificationCodeTypeRetrievePassword //找回或修改密码 | |
| 17 | +}; | |
| 18 | + | |
| 19 | +//修改单项用户信息类型 | |
| 20 | +typedef NS_ENUM(NSUInteger, UserInfoType) { | |
| 21 | + UserInfoTypeNickName = 0, //昵称 | |
| 22 | + UserInfoTypeGender, //性别(f/m/n) | |
| 23 | + UserInfoTypeEmail, //邮箱 | |
| 24 | + UserInfoTypeLocation, //联系方式(地址) | |
| 25 | +}; | |
| 26 | + | |
| 27 | +//校验验证码 | |
| 28 | +typedef NS_ENUM(NSInteger, CheckVerificationCodeType) { | |
| 29 | + CheckVerificationCodeTypeRegister = 0,//注册前校验验证码 | |
| 30 | + CheckVerificationCodeTypeShortcutLogin //快捷登录前校验验证码 | |
| 31 | +}; | |
| 32 | + | |
| 33 | +#endif /* CNLiveUserSystemTypeDef_h */ | ... | ... |
Products/CNLiveUserSystemSDK.framework/Headers/NSString+Keychain.h
0 → 100644
| 1 | +// | |
| 2 | +// NSString+Keychain.h | |
| 3 | +// XWTest | |
| 4 | +// | |
| 5 | +// Created by CNLive-zxw on 2019/7/8. | |
| 6 | +// Copyright © 2019 CNLive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +// 获取UUID | |
| 12 | +#define XW_UUID [NSString xw_getUUIDInKeychain] | |
| 13 | +// 是否存在UUID | |
| 14 | +#define XW_UUID_Exist [NSString xw_existUUID] | |
| 15 | + | |
| 16 | +// 获取时间戳 | |
| 17 | +#define XW_Timestamp [NSString xw_getTimestampInKeychain] | |
| 18 | +// 是否存在时间戳 | |
| 19 | +#define XW_Timestamp_Exist [NSString xw_existTimestamp] | |
| 20 | + | |
| 21 | +// 获取UUID_时间戳 传入时间戳 | |
| 22 | +#define XW_UUID_Timestamp(Timestamp) [Timestamp xw_getUUIDTimestampInKeychain] | |
| 23 | + | |
| 24 | +NS_ASSUME_NONNULL_BEGIN | |
| 25 | + | |
| 26 | +@interface NSString (Keychain) | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * @abstract 获取设备UUID | |
| 30 | + * | |
| 31 | + * 本方法是得到 UUID 后存入系统中的 keychain 的方法 | |
| 32 | + * 程序删除后重装,仍可以得到相同的唯一标示 | |
| 33 | + * 但是当系统刷机后,系统中的钥匙串会被清空,此时本方法失效 | |
| 34 | + * | |
| 35 | + * @return 返回UUID字符串对象 | |
| 36 | + */ | |
| 37 | ++ (NSString *)xw_getUUIDInKeychain; | |
| 38 | ++ (BOOL)xw_existUUID; | |
| 39 | + | |
| 40 | + | |
| 41 | +/** | |
| 42 | + * @abstract 获取时间戳 | |
| 43 | + * 获取的时间戳就是第一次调用xw_getTimeInKeychain这个方法,此方法会把传入的时间戳存入系统中的 keychain | |
| 44 | + * 我们调用此方法获取时间戳的时候,如果有,则返回;如果没有,则返回当前时间戳 | |
| 45 | + * 一定确保此方法在xw_getTimeInKeychain之后调用 * | |
| 46 | + * | |
| 47 | + * @return 返回时间戳字符串对象 | |
| 48 | + */ | |
| 49 | ++ (NSString *)xw_getTimestampInKeychain; | |
| 50 | ++ (BOOL)xw_existTimestamp; | |
| 51 | + | |
| 52 | + | |
| 53 | +/** | |
| 54 | + * @abstract 获取UUID和_和时间戳3个的拼接对象 | |
| 55 | + * | |
| 56 | + * 本方法一定要使用时间戳字符串调用 * | |
| 57 | + * 本方法是得到 UUID_时间戳 后存入系统中的 keychain 的方法 | |
| 58 | + * 程序删除后重装,仍可以得到相同的唯一标示 | |
| 59 | + * 但是当系统刷机后,系统中的钥匙串会被清空,此时本方法失效 | |
| 60 | + * | |
| 61 | + * @return 返回获取UUID和_和时间戳3个的拼接对象 | |
| 62 | + */ | |
| 63 | +- (NSString *)xw_getUUIDTimestampInKeychain; | |
| 64 | + | |
| 65 | + | |
| 66 | +//保存数据至钥匙串中 | |
| 67 | ++ (void)xw_save:(NSString *)service data:(id)data; | |
| 68 | + | |
| 69 | + | |
| 70 | +//从钥匙串中加载数据 | |
| 71 | ++ (id)xw_load:(NSString *)service; | |
| 72 | + | |
| 73 | + | |
| 74 | +//删除数据 | |
| 75 | ++ (void)xw_delete:(NSString *)service; | |
| 76 | ++ (void)xw_deletes; | |
| 77 | + | |
| 78 | +/** | |
| 79 | + * 保存已有的UUID_TS到钥匙串 | |
| 80 | + * | |
| 81 | + * @param UUID UUID的字符串 | |
| 82 | + * @param TS TS的字符串 | |
| 83 | + */ | |
| 84 | ++ (void)xw_saveUUID:(NSString *)UUID TS:(NSString *)TS; | |
| 85 | + | |
| 86 | +@end | |
| 87 | + | |
| 88 | +NS_ASSUME_NONNULL_END | ... | ... |
Products/CNLiveUserSystemSDK.framework/Info.plist
0 → 100644
No preview for this file type