Commit 855cbe638530f601f9f6a0e29b7c5f39780268a5
1 parent
22f1076a
更新1.1.6 ,新增手机号国家码API
Showing
6 changed files
with
358 additions
and
1 deletions
CNLiveUserSystemDemo/CNLiveUserSystemSDK/Common.h
| @@ -11,6 +11,6 @@ | @@ -11,6 +11,6 @@ | ||
| 11 | 11 | ||
| 12 | #define kSVer @"4.0" //探针版本 | 12 | #define kSVer @"4.0" //探针版本 |
| 13 | #define StatAppVersion ([[[NSBundle mainBundle] infoDictionary] objectForKey: @"CFBundleShortVersionString"]) | 13 | #define StatAppVersion ([[[NSBundle mainBundle] infoDictionary] objectForKey: @"CFBundleShortVersionString"]) |
| 14 | -#define SDKVersion @"1.1.5" //SDK版本 | 14 | +#define SDKVersion @"1.1.6" //SDK版本 |
| 15 | 15 | ||
| 16 | #endif /* Common_h */ | 16 | #endif /* Common_h */ |
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 | + @abstract 初始化 | ||
| 28 | + @param appId 注册成功获得应用ID | ||
| 29 | + @param appKey 注册成功获得应用key | ||
| 30 | + @param appSecret 注册成功获得应用secret | ||
| 31 | + @warning 必传参数 | ||
| 32 | + 必须在 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 方法中调用 | ||
| 33 | + *此方法环境默认为正式环境,建议使用如下方法初始化. | ||
| 34 | + + (void)setAppId:(NSString *)appId appKey:(NSString *)appKey appSecret:(NSString *)appSecret isTestEnvironment:(BOOL)isTestEnvironment; | ||
| 35 | + | ||
| 36 | + */ | ||
| 37 | ++ (void)setAppId:(NSString *)appId appKey:(NSString *)appKey appSecret:(NSString *)appSecret; | ||
| 38 | + | ||
| 39 | +/** | ||
| 40 | + @abstract 注册 | ||
| 41 | + @param userName 邮箱或手机 | ||
| 42 | + @param password 密码 | ||
| 43 | + @param verificationCode 手机验证码(手机号注册时必填) | ||
| 44 | + @param invitationCode 邀请码(非必填) | ||
| 45 | + @param frmId 渠道ID(非必填) | ||
| 46 | + @param success 成功回调 | ||
| 47 | + @param failure 失败回调 | ||
| 48 | + */ | ||
| 49 | ++ (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; | ||
| 50 | + | ||
| 51 | + | ||
| 52 | +/** | ||
| 53 | + @abstract 第三方登录 | ||
| 54 | + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq 3:weixin 4:renren 注:如qq登录,plat=@"2") | ||
| 55 | + @param thirdPartyId 第三方用户ID | ||
| 56 | + @param nickName 用户昵称 | ||
| 57 | + @param gender 性别,m:男、f:女、n:未知(非必填) | ||
| 58 | + @param location 用户所在地(非必填) | ||
| 59 | + @param faceUrl 头像,约100*100(非必填) | ||
| 60 | + @param frmId 渠道ID(非必填) | ||
| 61 | + @param success 成功回调 | ||
| 62 | + @param failure 失败回调 | ||
| 63 | + */ | ||
| 64 | ++ (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; | ||
| 65 | + | ||
| 66 | + | ||
| 67 | +/** | ||
| 68 | + @abstract 快捷登录(旧) | ||
| 69 | + @param userName 手机号 | ||
| 70 | + @param verificationCode 验证码 | ||
| 71 | + @param frmId 渠道ID(非必填) | ||
| 72 | + @param success 成功回调 | ||
| 73 | + @param failure 失败回调 | ||
| 74 | + */ | ||
| 75 | ++ (void)shortcutLoginWithUserName:(NSString *)userName verificationCode:(NSString *)verificationCode frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 76 | + | ||
| 77 | +/** | ||
| 78 | + @abstract 快捷登录(新) | ||
| 79 | + @param userName 手机号 | ||
| 80 | + @param countryCode 手机号国家码 | ||
| 81 | + @param verificationCode 验证码 | ||
| 82 | + @param frmId 渠道ID(非必填) | ||
| 83 | + @param success 成功回调 | ||
| 84 | + @param failure 失败回调 | ||
| 85 | + */+ (void)shortcutLoginWithUserName:(NSString *)userName countryCode:(NSString *)countryCode verificationCode:(NSString *)verificationCode frmId:(NSString *)frmId success:(void (^)(id))success failure :(void (^)(NSDictionary *))failure; | ||
| 86 | + | ||
| 87 | +/** | ||
| 88 | + @abstract 登录 | ||
| 89 | + @param userName 手机号或邮箱 | ||
| 90 | + @param password 密码 | ||
| 91 | + @param frmId 渠道ID(非必填) | ||
| 92 | + @param success 成功回调 | ||
| 93 | + @param failure 失败回调 | ||
| 94 | + */ | ||
| 95 | ++ (void)loginWithUserName:(NSString *)userName password:(NSString *)password frmId:(NSString *)frmId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 96 | + | ||
| 97 | + | ||
| 98 | +/** | ||
| 99 | + @abstract 发送验证码 | ||
| 100 | + @param mobile 手机号 | ||
| 101 | + @param type 发送验证码类型(详见VerificationCodeType) | ||
| 102 | + @param success 成功回调 | ||
| 103 | + @param failure 失败回调 | ||
| 104 | + */ | ||
| 105 | ++ (void)verificationCodeType:(VerificationCodeType)type mobile:(NSString *)mobile success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 106 | + | ||
| 107 | + | ||
| 108 | +/** | ||
| 109 | + @abstract 更新用户附加信息 | ||
| 110 | + @param uid 用户ID | ||
| 111 | + @param extInfo 扩展信息(格式由对方自己组织,平台只负责存储和原样读取,NSString类型) | ||
| 112 | + @param success 成功回调 | ||
| 113 | + @param failure 失败回调 | ||
| 114 | + */ | ||
| 115 | ++ (void)updateOtherInfoWithUid:(NSString *)uid extInfo:(NSString *)extInfo success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 116 | + | ||
| 117 | + | ||
| 118 | +/** | ||
| 119 | + @abstract 修改用户单项信息 | ||
| 120 | + @param type 修改类型(nickName-昵称,gender-性别,email-邮箱, location-联系方式(地址)) | ||
| 121 | + @param uid 用户ID | ||
| 122 | + @param info 对应的信息(注gender对应f/m/n) | ||
| 123 | + @param success 成功回调 | ||
| 124 | + @param failure 失败回调 | ||
| 125 | + */ | ||
| 126 | ++ (void)modifyUserInfoType:(UserInfoType)type uid:(NSString *)uid modifyInfo:(NSString *)info success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 127 | + | ||
| 128 | + | ||
| 129 | +/** | ||
| 130 | + @abstract 更新手机号(旧) | ||
| 131 | + @param uid 用户ID | ||
| 132 | + @param mobile 手机号 | ||
| 133 | + @param verificationCode 验证码 | ||
| 134 | + @param success 成功回调 | ||
| 135 | + @param failure 失败回调 | ||
| 136 | + */ | ||
| 137 | ++ (void)updateMobileWithUid:(NSString *)uid mobile:(NSString *)mobile verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 138 | + | ||
| 139 | +/** | ||
| 140 | + @abstract 更新手机号(新) | ||
| 141 | + @param uid 用户ID | ||
| 142 | + @param mobile 手机号 | ||
| 143 | + @param countryCode 手机号国家码 | ||
| 144 | + @param verificationCode 验证码 | ||
| 145 | + @param success 成功回调 | ||
| 146 | + @param failure 失败回调 | ||
| 147 | + */ | ||
| 148 | ++(void)updateMobileWithUid:(NSString *)uid mobile:(NSString *)mobile countryCode:(NSString *)countryCode verificationCode:(NSString *)verificationCode success:(void (^)(id))success failure:(void (^)(NSDictionary *))failure; | ||
| 149 | + | ||
| 150 | +/** | ||
| 151 | + @abstract 绑定第三方账号 | ||
| 152 | + @param uid 用户ID | ||
| 153 | + @param plat 第三方平台编号(如platform: 1:sina weibo 2:qq 3:weixin 4:renren 注:如绑定qq,thirdPartyPlat = @"2") | ||
| 154 | + @param thirdPartyId 第三方用户ID | ||
| 155 | + @param success 成功回调 | ||
| 156 | + @param failure 失败回调 | ||
| 157 | + */ | ||
| 158 | ++ (void)bindingThirdPartyWithUid:(NSString *)uid thirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 159 | + | ||
| 160 | + | ||
| 161 | +/** | ||
| 162 | + @abstract 修改密码(通过手机号修改) | ||
| 163 | + @param mobile 手机号 | ||
| 164 | + @param verificationCode 验证码 | ||
| 165 | + @param newPassword 新密码 | ||
| 166 | + @param success 成功回调 | ||
| 167 | + @param failure 失败回调 | ||
| 168 | + */ | ||
| 169 | ++ (void)changePasswordWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode newPassword:(NSString *)newPassword success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 170 | + | ||
| 171 | + | ||
| 172 | +/** | ||
| 173 | + @abstract 上传头像 | ||
| 174 | + @param uid 用户ID | ||
| 175 | + @param icon 头像 (图片质量 0.5) | ||
| 176 | + @param success 成功回调 | ||
| 177 | + @param failure 失败回调 | ||
| 178 | + */ | ||
| 179 | ++ (void)uploadIconWithUid:(NSString *)uid icon:(UIImage *)icon success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 180 | + | ||
| 181 | +/** | ||
| 182 | + @abstract 上传头像 新增 | ||
| 183 | + @param uid 用户ID | ||
| 184 | + @param compressionQuality 头像质量 0-1 Default 0.5 | ||
| 185 | + @param icon 头像 | ||
| 186 | + @param success 成功回调 | ||
| 187 | + @param failure 失败回调 | ||
| 188 | + | ||
| 189 | + */ | ||
| 190 | ++ (void)uploadIconWithUid:(NSString *)uid icon:(UIImage *)icon compressionQuality:(CGFloat)compressionQuality success:(void (^)(id))success failure:(void (^)(NSDictionary *))failure; | ||
| 191 | + | ||
| 192 | +/** | ||
| 193 | + @abstract 查询用户信息 | ||
| 194 | + @param uid 用户ID | ||
| 195 | + @param srcUid 被查询用户ID | ||
| 196 | + @param success 成功回调 | ||
| 197 | + @param failure 失败回调 | ||
| 198 | + */ | ||
| 199 | ++ (void)queryUserInfoWithUid:(NSString *)uid srcUid:(NSString *)srcUid success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 200 | + | ||
| 201 | + | ||
| 202 | +/** | ||
| 203 | + @abstract 查询多条用户信息 | ||
| 204 | + @param uid 用户ID | ||
| 205 | + @param srcUids 被查询用户IDs | ||
| 206 | + @param success 成功回调 | ||
| 207 | + @param failure 失败回调 | ||
| 208 | + */ | ||
| 209 | ++ (void)queryMoreUserInfosWithUid:(NSString *)uid srcUids:(NSArray *)srcUids success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 210 | + | ||
| 211 | + | ||
| 212 | +/** | ||
| 213 | + @abstract 用户反馈 | ||
| 214 | + @param contentId 举报内容ID | ||
| 215 | + @param message 举报内容(app自己组织-不能带特殊字符&号等) | ||
| 216 | + @param success 成功回调 | ||
| 217 | + @param failure 失败回调 | ||
| 218 | + */ | ||
| 219 | ++ (void)feedbackWithContentId:(NSString *)contentId message:(NSString *)message success:(void (^)(id result))success failure:(void (^)(NSDictionary *errorDic))failure; | ||
| 220 | + | ||
| 221 | + | ||
| 222 | +/** | ||
| 223 | + 通过邮箱修改密码 | ||
| 224 | + | ||
| 225 | + @param email 邮箱 | ||
| 226 | + @param newPwd 新密码 | ||
| 227 | + @param success 成功回调 | ||
| 228 | + @param failure 失败回调 | ||
| 229 | + */ | ||
| 230 | ++ (void)modifyPwdWithEmail:(NSString *)email newPwd:(NSString *)newPwd success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | ||
| 231 | + | ||
| 232 | + | ||
| 233 | +/** | ||
| 234 | + 通过原密码修改密码 | ||
| 235 | + | ||
| 236 | + @param uid 用户ID | ||
| 237 | + @param pwd 原密码 | ||
| 238 | + @param newPwd 新密码 | ||
| 239 | + @param success 成功回调 | ||
| 240 | + @param failure 失败回调 | ||
| 241 | + */ | ||
| 242 | ++ (void)oldPwdChangePasswordWithUid:(NSString *)uid pwd:(NSString *)pwd newPwd:(NSString *)newPwd success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | ||
| 243 | + | ||
| 244 | + | ||
| 245 | +/** | ||
| 246 | + 注册前校验手机验证码(旧) | ||
| 247 | + | ||
| 248 | + @param mobile 手机号 | ||
| 249 | + @param verificationCode 验证码 | ||
| 250 | + @param success 成功回调 | ||
| 251 | + @param failure 失败回调 | ||
| 252 | + */ | ||
| 253 | ++ (void)registerCheckVerificationCodeWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | ||
| 254 | + | ||
| 255 | +/** | ||
| 256 | + 注册前校验手机验证码(新) | ||
| 257 | + | ||
| 258 | + @param mobile 手机号 | ||
| 259 | + @param countryCode 手机号国家码 | ||
| 260 | + @param verificationCode 验证码 | ||
| 261 | + @param success 成功回调 | ||
| 262 | + @param failure 失败回调 | ||
| 263 | + */ | ||
| 264 | ++ (void)registerCheckVerificationCodeWithMobile:(NSString *)mobile countryCode:(NSString *)countryCode verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | ||
| 265 | + | ||
| 266 | +/** | ||
| 267 | + 快捷登录前校验手机验证码(旧) | ||
| 268 | + | ||
| 269 | + @param mobile 手机号 | ||
| 270 | + @param verificationCode 验证码 | ||
| 271 | + @param success 成功回调 | ||
| 272 | + @param failure 失败回调 | ||
| 273 | + */ | ||
| 274 | ++ (void)shortcutLoginCheckVerificationCodeWithMobile:(NSString *)mobile verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | ||
| 275 | + | ||
| 276 | +/** | ||
| 277 | + 快捷登录前校验手机验证码(新) | ||
| 278 | + | ||
| 279 | + @param mobile 手机号 | ||
| 280 | + @param countryCode 手机号国家码 | ||
| 281 | + @param success 成功回调 | ||
| 282 | + @param failure 失败回调 | ||
| 283 | + */ | ||
| 284 | ++ (void)shortcutLoginCheckVerificationCodeWithMobile:(NSString *)mobile countryCode:(NSString *)countryCode verificationCode:(NSString *)verificationCode success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | ||
| 285 | + | ||
| 286 | +/** | ||
| 287 | + 验证第三方账号是否注册,若注册则直接登录返回用户信息,若未注册返回errorCode | ||
| 288 | + | ||
| 289 | + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq 3:weixin 4:renren 注:如qq登录,plat=@"2") | ||
| 290 | + @param thirdPartyId 第三方用户ID | ||
| 291 | + @param frmId 渠道ID(非必填) | ||
| 292 | + @param success 成功回调 | ||
| 293 | + @param failure 失败回调 | ||
| 294 | + */ | ||
| 295 | ++ (void)thirdPartyCheckLoginWithThirdPartyPlatType:(NSString *)plat thirdPartyId:(NSString *)thirdPartyId frmId:(NSString *)frmId success:(void (^)(id result))success failure :(void (^)(NSDictionary *errorDic))failure; | ||
| 296 | + | ||
| 297 | + | ||
| 298 | +/** | ||
| 299 | + 第三方注册强制绑定手机号登录: 手机号+密码+验证码+三方账号 | ||
| 300 | + | ||
| 301 | + @param plat 第三方平台编号(如plat: 1:sina weibo 2:qq 3:weixin 4:renren 注:如qq登录,plat=@"2") | ||
| 302 | + @param thirdPartyId 第三方用户ID | ||
| 303 | + @param nickName 用户昵称 | ||
| 304 | + @param gender 性别,m:男、f:女、n:未知(非必填) | ||
| 305 | + @param location 用户所在地(非必填) | ||
| 306 | + @param faceUrl 头像,约100*100(非必填) | ||
| 307 | + @param mobile 手机号 | ||
| 308 | + @param verificationCode 验证码 (验证码类型为快捷登录VerificationCodeTypeShortcutLogin) | ||
| 309 | + @param pawd 注册密码 | ||
| 310 | + @param frmId 渠道ID(非必填) | ||
| 311 | + @param success 成功回调 | ||
| 312 | + @param failure 失败回调 | ||
| 313 | + */ | ||
| 314 | ++ (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; | ||
| 315 | + | ||
| 316 | + | ||
| 317 | +/** | ||
| 318 | + * 获取SDK版本号 | ||
| 319 | + */ | ||
| 320 | ++ (NSString *)getVersion; | ||
| 321 | + | ||
| 322 | + | ||
| 323 | + | ||
| 324 | +@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/Info.plist
0 → 100644
No preview for this file type
iOS用户SDK.docx
No preview for this file type