mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-08-26 12:41:53 +08:00
iOS & flutter
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
## 3.1.0
|
||||||
|
|
||||||
|
* 升级 Android/iOS SDK
|
||||||
|
* 新增 setIsPermissionGranted 函数
|
||||||
|
|
||||||
## 3.0.0
|
## 3.0.0
|
||||||
|
|
||||||
* 重构
|
* 重构
|
||||||
|
@ -167,7 +167,16 @@ public class TencentKitPlugin implements FlutterPlugin, ActivityAware, ActivityR
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
|
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
|
||||||
if (METHOD_REGISTERAPP.equals(call.method)) {
|
if ("setIsPermissionGranted".equals(call.method)) {
|
||||||
|
final boolean granted = call.argument("granted");
|
||||||
|
final String buildModel = call.argument("build_model");
|
||||||
|
if (!TextUtils.isEmpty(buildModel)) {
|
||||||
|
Tencent.setIsPermissionGranted(granted, buildModel);
|
||||||
|
} else {
|
||||||
|
Tencent.setIsPermissionGranted(granted);
|
||||||
|
}
|
||||||
|
result.success(null);
|
||||||
|
} else if (METHOD_REGISTERAPP.equals(call.method)) {
|
||||||
final String appId = call.argument(ARGUMENT_KEY_APPID);
|
final String appId = call.argument(ARGUMENT_KEY_APPID);
|
||||||
// final String universalLink = call.argument(ARGUMENT_KEY_UNIVERSALLINK);
|
// final String universalLink = call.argument(ARGUMENT_KEY_UNIVERSALLINK);
|
||||||
String authority = null;
|
String authority = null;
|
||||||
@ -183,15 +192,6 @@ public class TencentKitPlugin implements FlutterPlugin, ActivityAware, ActivityR
|
|||||||
tencent = Tencent.createInstance(appId, applicationContext);
|
tencent = Tencent.createInstance(appId, applicationContext);
|
||||||
}
|
}
|
||||||
result.success(null);
|
result.success(null);
|
||||||
} else if ("setIsPermissionGranted".equals(call.method)) {
|
|
||||||
final boolean granted = call.argument("granted");
|
|
||||||
final String buildModel = call.argument("build_model");
|
|
||||||
if (!TextUtils.isEmpty(buildModel)) {
|
|
||||||
Tencent.setIsPermissionGranted(granted, buildModel);
|
|
||||||
} else {
|
|
||||||
Tencent.setIsPermissionGranted(granted);
|
|
||||||
}
|
|
||||||
result.success(null);
|
|
||||||
} else if (METHOD_ISQQINSTALLED.equals(call.method)) {
|
} else if (METHOD_ISQQINSTALLED.equals(call.method)) {
|
||||||
result.success(isAppInstalled(applicationContext, "com.tencent.mobileqq"));
|
result.success(isAppInstalled(applicationContext, "com.tencent.mobileqq"));
|
||||||
} else if (METHOD_ISTIMINSTALLED.equals(call.method)) {
|
} else if (METHOD_ISTIMINSTALLED.equals(call.method)) {
|
||||||
|
@ -21,6 +21,6 @@
|
|||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
<string>8.0</string>
|
<string>9.0</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -35,7 +35,7 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/tencent_kit/ios"
|
:path: ".symlinks/plugins/tencent_kit/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
|
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
||||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
|
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
|
||||||
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
||||||
@ -43,4 +43,4 @@ SPEC CHECKSUMS:
|
|||||||
|
|
||||||
PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
|
PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
|
||||||
|
|
||||||
COCOAPODS: 1.10.1
|
COCOAPODS: 1.11.2
|
||||||
|
@ -165,7 +165,7 @@
|
|||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1020;
|
LastUpgradeCheck = 1300;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1020"
|
LastUpgradeVersion = "1300"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
@ -15,13 +15,6 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.2"
|
version: "1.7.2"
|
||||||
archive:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: archive
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "3.1.2"
|
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -215,7 +208,7 @@ packages:
|
|||||||
name: flutter_cache_manager
|
name: flutter_cache_manager
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0-nullsafety.1"
|
version: "3.3.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -256,13 +249,6 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0"
|
version: "4.0.0"
|
||||||
image:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: image
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.1"
|
|
||||||
io:
|
io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -375,13 +361,6 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.0"
|
version: "1.11.0"
|
||||||
petitparser:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: petitparser
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "4.0.2"
|
|
||||||
platform:
|
platform:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -519,7 +498,7 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "3.0.0"
|
version: "3.1.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -590,13 +569,6 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
version: "0.2.0"
|
||||||
xml:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: xml
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "5.0.2"
|
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -26,7 +26,7 @@ dependencies:
|
|||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
|
|
||||||
flutter_cache_manager: ^3.0.0-nullsafety.1
|
flutter_cache_manager: ^3.0.0
|
||||||
|
|
||||||
json_annotation: ^4.0.0
|
json_annotation: ^4.0.0
|
||||||
|
|
||||||
|
@ -83,7 +83,11 @@ static NSString *const SCHEME_FILE = @"file";
|
|||||||
|
|
||||||
- (void)handleMethodCall:(FlutterMethodCall *)call
|
- (void)handleMethodCall:(FlutterMethodCall *)call
|
||||||
result:(FlutterResult)result {
|
result:(FlutterResult)result {
|
||||||
if ([METHOD_REGISTERAPP isEqualToString:call.method]) {
|
if ([@"setIsPermissionGranted" isEqualToString:call.method]) {
|
||||||
|
NSNumber *granted = call.arguments[@"granted"];
|
||||||
|
[TencentOAuth setIsUserAgreedAuthorization: [granted boolValue]];
|
||||||
|
result(nil);
|
||||||
|
} else if ([METHOD_REGISTERAPP isEqualToString:call.method]) {
|
||||||
NSString *appId = call.arguments[ARGUMENT_KEY_APPID];
|
NSString *appId = call.arguments[ARGUMENT_KEY_APPID];
|
||||||
NSString *universalLink = call.arguments[ARGUMENT_KEY_UNIVERSALLINK];
|
NSString *universalLink = call.arguments[ARGUMENT_KEY_UNIVERSALLINK];
|
||||||
if (universalLink != nil) {
|
if (universalLink != nil) {
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
|
|
||||||
typedef void (^sendResultBlock)(NSDictionary *result);
|
typedef void (^sendResultBlock)(NSDictionary *result);
|
||||||
|
|
||||||
|
// 发送消息回调是否发送成功
|
||||||
|
typedef void(^QQApiInterfaceSendMessageResultBlock)(QQApiSendResultCode sendResultCode, NSString *message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief 处理来至QQ的请求及响应的回调协议
|
\brief 处理来至QQ的请求及响应的回调协议
|
||||||
*/
|
*/
|
||||||
@ -79,6 +82,54 @@ typedef void (^sendResultBlock)(NSDictionary *result);
|
|||||||
|
|
||||||
|
|
||||||
+ (QQApiSendResultCode)sendMessageToQQAuthWithReq:(QQBaseReq*)req;
|
+ (QQApiSendResultCode)sendMessageToQQAuthWithReq:(QQBaseReq*)req;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
向手Q发起绑群请求
|
||||||
|
\param req 请求的内容
|
||||||
|
\param resultBlock 请求回调
|
||||||
|
*/
|
||||||
|
+ (void)sendThirdAppBindGroupReq:(QQBaseReq *)req resultBlock:(sendResultBlock)resultBlock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
向手Q发起加群请求
|
||||||
|
\param req 请求的内容
|
||||||
|
\param resultBlock 请求回调
|
||||||
|
*/
|
||||||
|
+ (void)sendThirdAppJoinGroupReq:(QQBaseReq *)req resultBlock:(sendResultBlock)resultBlock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
向手Q发起解绑群请求
|
||||||
|
\param req 请求的内容
|
||||||
|
\param resultBlock 请求回调
|
||||||
|
*/
|
||||||
|
+ (void)sendThirdAppUnBindGroupReq:(QQBaseReq *)req resultBlock:(sendResultBlock)resultBlock;
|
||||||
|
|
||||||
|
/**
|
||||||
|
向手Q发起创建QQ频道的请求
|
||||||
|
\param req 请求的内容
|
||||||
|
\param resultBlock 回调发送结果
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
+ (void)sendMessageToCreateQQGroupProWithMessageRequest:(SendMessageToQQReq *)messageRequest sendResultBlock:(QQApiInterfaceSendMessageResultBlock)sendResultBlock;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
向手Q发起加入QQ频道的请求
|
||||||
|
\param req 请求的内容
|
||||||
|
\param resultBlock 回调发送结果
|
||||||
|
\return void
|
||||||
|
*/
|
||||||
|
+ (void)sendMessageToJoinQQGroupProWithMessageRequest:(SendMessageToQQReq *)messageRequest sendResultBlock:(QQApiInterfaceSendMessageResultBlock)sendResultBlock;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
向手Q发起查询QQ频道openID的请求
|
||||||
|
\param req 请求的内容
|
||||||
|
\param resultBlock 请求回调
|
||||||
|
*/
|
||||||
|
+ (void)sendQueryQQGroupProInfo:(QQBaseReq *)req resultBlock:(sendResultBlock)resultBlock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
向手Q发起组图分享到表情收藏
|
向手Q发起组图分享到表情收藏
|
||||||
\param req 分享内容的请求
|
\param req 分享内容的请求
|
||||||
@ -159,6 +210,7 @@ typedef void (^sendResultBlock)(NSDictionary *result);
|
|||||||
+ (NSString *)getTIMInstallUrl;
|
+ (NSString *)getTIMInstallUrl;
|
||||||
|
|
||||||
#pragma mark - Log
|
#pragma mark - Log
|
||||||
|
|
||||||
/*! @brief 调用此函数可以导出QQSDK的Log到第三方中,用于定位问题
|
/*! @brief 调用此函数可以导出QQSDK的Log到第三方中,用于定位问题
|
||||||
|
|
||||||
注意1:SDK会强引用这个block,注意不要导致内存泄漏,注意不要导致内存泄漏
|
注意1:SDK会强引用这个block,注意不要导致内存泄漏,注意不要导致内存泄漏
|
||||||
@ -167,10 +219,14 @@ typedef void (^sendResultBlock)(NSDictionary *result);
|
|||||||
* @param logBlock 打印log的回调block
|
* @param logBlock 打印log的回调block
|
||||||
*/
|
*/
|
||||||
+ (void)startLogWithBlock:(QQApiLogBolock)logBlock;
|
+ (void)startLogWithBlock:(QQApiLogBolock)logBlock;
|
||||||
|
|
||||||
///停止回调打印
|
///停止回调打印
|
||||||
+ (void)stopLog;
|
+ (void)stopLog;
|
||||||
|
|
||||||
///设置打印日志到文件开关on/off,如果不设置,默认不打印到文件
|
///设置打印日志到文件开关on/off,如果不设置,默认不打印到文件
|
||||||
+ (void)setSwitchPrintLogToFile:(BOOL)on;
|
+ (void)setSwitchPrintLogToFile:(BOOL)on;
|
||||||
|
|
||||||
///日志文件目录
|
///日志文件目录
|
||||||
+ (NSString *)getLogFilePath;
|
+ (NSString *)getLogFilePath;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -33,11 +33,13 @@ typedef NS_ENUM(NSInteger,QQApiSendResultCode) {
|
|||||||
EQQAPI_THIRD_APP_GROUP_ERROR_CGI_FAILED = 15, // CGI请求失败
|
EQQAPI_THIRD_APP_GROUP_ERROR_CGI_FAILED = 15, // CGI请求失败
|
||||||
EQQAPI_THIRD_APP_GROUP_ERROR_HAS_BINDED = 16, // 该组织已经绑定群聊
|
EQQAPI_THIRD_APP_GROUP_ERROR_HAS_BINDED = 16, // 该组织已经绑定群聊
|
||||||
EQQAPI_THIRD_APP_GROUP_ERROR_NOT_BINDED = 17, // 该组织尚未绑定群聊
|
EQQAPI_THIRD_APP_GROUP_ERROR_NOT_BINDED = 17, // 该组织尚未绑定群聊
|
||||||
|
EQQAPI_THIRD_APP_GROUP_ERROR_HAS_UNBINDED = 18, // 该组织已经解绑群聊
|
||||||
EQQAPIQZONENOTSUPPORTTEXT = 10000, // qzone分享不支持text类型分享
|
EQQAPIQZONENOTSUPPORTTEXT = 10000, // qzone分享不支持text类型分享
|
||||||
EQQAPIQZONENOTSUPPORTIMAGE = 10001, // qzone分享不支持image类型分享
|
EQQAPIQZONENOTSUPPORTIMAGE = 10001, // qzone分享不支持image类型分享
|
||||||
EQQAPIVERSIONNEEDUPDATE = 10002, // 当前QQ版本太低,需要更新至新版本才可以支持
|
EQQAPIVERSIONNEEDUPDATE = 10002, // 当前QQ版本太低,需要更新至新版本才可以支持
|
||||||
ETIMAPIVERSIONNEEDUPDATE = 10004, // 当前TIM版本太低,需要更新至新版本才可以支持
|
ETIMAPIVERSIONNEEDUPDATE = 10004, // 当前TIM版本太低,需要更新至新版本才可以支持
|
||||||
EAPPURLTYPESILLEGALITY = 20000, // (>=3.3.8)第三方APP的info.plist中UrlTypes字段存在QQ的UrlScheme
|
EAPPURLTYPESILLEGALITY = 20000, // (>=3.3.8)第三方APP的info.plist中UrlTypes字段存在QQ的UrlScheme
|
||||||
|
EQQAPI_ERROR_USER_NOT_AGREED_AUTHORIZATION = 30001, // 用户未同意隐私协议,用户同意隐私协议后,需要设置[TencentOAuth setIsUserAgreedAuthorization:YES];
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma mark - QQApiObject(分享对象类型)
|
#pragma mark - QQApiObject(分享对象类型)
|
||||||
@ -74,13 +76,14 @@ typedef void(^QQApiLogBolock)(NSString *logStr);
|
|||||||
/** \brief 所有在QQ及插件间发送的数据对象的根类。
|
/** \brief 所有在QQ及插件间发送的数据对象的根类。
|
||||||
*/
|
*/
|
||||||
__attribute__((visibility("default"))) @interface QQApiObject : NSObject
|
__attribute__((visibility("default"))) @interface QQApiObject : NSObject
|
||||||
@property(nonatomic, retain) NSString* title; ///< 标题,最长128个字符
|
|
||||||
@property(nonatomic, retain) NSString* description; ///<简要描述,最长512个字符
|
@property (nonatomic, copy) NSString *title; ///< 标题,最长128个字符
|
||||||
@property(nonatomic, retain) NSString* universalLink; ///(>=3.3.7)支持第三方传入在互联开放平台注册的universallink
|
@property (nonatomic, copy) NSString *description; ///<简要描述,最长512个字符
|
||||||
|
@property (nonatomic, copy) NSString *universalLink; ///(>=3.3.7)支持第三方传入在互联开放平台注册的universallink
|
||||||
@property (nonatomic, assign) uint64_t cflag;
|
@property (nonatomic, assign) uint64_t cflag;
|
||||||
//353新增两个字断给游戏侧使用,对齐微信sdk
|
//353新增两个字断给游戏侧使用,对齐微信sdk
|
||||||
@property(nonatomic, retain) NSString* tagName;
|
@property (nonatomic, copy) NSString *tagName;
|
||||||
@property(nonatomic, retain) NSString* messageExt;
|
@property (nonatomic, copy) NSString *messageExt;
|
||||||
/*
|
/*
|
||||||
* 分享到QQ/TIM
|
* 分享到QQ/TIM
|
||||||
* SDK根据是否安装对应客户端进行判断,判断顺序:QQ > TIM
|
* SDK根据是否安装对应客户端进行判断,判断顺序:QQ > TIM
|
||||||
@ -93,7 +96,7 @@ __attribute__((visibility("default"))) @interface QQApiObject : NSObject
|
|||||||
/** \brief 支持Ark的根类。
|
/** \brief 支持Ark的根类。
|
||||||
*/
|
*/
|
||||||
__attribute__((visibility("default"))) @interface ArkObject : NSObject
|
__attribute__((visibility("default"))) @interface ArkObject : NSObject
|
||||||
@property(nonatomic,retain) NSString* arkData; ///< 显示Ark所需的数据,json串,长度暂不限制
|
@property (nonatomic, copy) NSString *arkData; ///< 显示Ark所需的数据,json串,长度暂不限制
|
||||||
@property (nonatomic,assign) QQApiObject* qqApiObject; ///<原有老版本的QQApiObject
|
@property (nonatomic,assign) QQApiObject* qqApiObject; ///<原有老版本的QQApiObject
|
||||||
|
|
||||||
- (id)initWithData:(NSString *)arkData qqApiObject:(QQApiObject*)qqApiObject;
|
- (id)initWithData:(NSString *)arkData qqApiObject:(QQApiObject*)qqApiObject;
|
||||||
@ -103,17 +106,17 @@ __attribute__((visibility("default"))) @interface ArkObject : NSObject
|
|||||||
#pragma mark QQ小程序
|
#pragma mark QQ小程序
|
||||||
//分享小程序消息 - QQ 8.0.8
|
//分享小程序消息 - QQ 8.0.8
|
||||||
__attribute__((visibility("default"))) @interface QQApiMiniProgramObject : NSObject
|
__attribute__((visibility("default"))) @interface QQApiMiniProgramObject : NSObject
|
||||||
@property(nonatomic,retain) QQApiObject* qqApiObject; //原有老版本的QQApiObject
|
@property (nonatomic, strong) QQApiObject* qqApiObject; //原有老版本的QQApiObject
|
||||||
@property(nonatomic,retain) NSString* miniAppID; //必填,小程序的AppId(注:必须在QQ互联平台中,将该小程序与分享的App绑定)
|
@property (nonatomic, copy) NSString *miniAppID; //必填,小程序的AppId(注:必须在QQ互联平台中,将该小程序与分享的App绑定)
|
||||||
@property(nonatomic,retain) NSString* miniPath; //必填,小程序的展示路径
|
@property (nonatomic, copy) NSString *miniPath; //必填,小程序的展示路径
|
||||||
@property(nonatomic,retain) NSString* webpageUrl; //必填,兼容低版本的网页链接
|
@property (nonatomic, copy) NSString *webpageUrl; //必填,兼容低版本的网页链接
|
||||||
@property (nonatomic,assign) MiniProgramType miniprogramType; //非必填,小程序的类型,默认正式版(3),可选测试版(1)、预览版(4)
|
@property (nonatomic,assign) MiniProgramType miniprogramType; //非必填,小程序的类型,默认正式版(3),可选测试版(1)、预览版(4)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
//唤起小程序 - QQ 8.1.8
|
//唤起小程序 - QQ 8.1.8
|
||||||
__attribute__((visibility("default"))) @interface QQApiLaunchMiniProgramObject : QQApiObject
|
__attribute__((visibility("default"))) @interface QQApiLaunchMiniProgramObject : QQApiObject
|
||||||
@property(nonatomic,retain) NSString* miniAppID; //必填,小程序的AppId(注:必须在QQ互联平台中,将该小程序与分享的App绑定)
|
@property (nonatomic, copy) NSString *miniAppID; //必填,小程序的AppId(注:必须在QQ互联平台中,将该小程序与分享的App绑定)
|
||||||
@property(nonatomic,retain) NSString* miniPath; //小程序的展示路径,不填展示默认小程序首页
|
@property (nonatomic, copy) NSString *miniPath; //小程序的展示路径,不填展示默认小程序首页
|
||||||
@property (nonatomic,assign) MiniProgramType miniprogramType; //非必填,小程序的类型,默认正式版(3),可选测试版(1)、开发版(0)
|
@property (nonatomic,assign) MiniProgramType miniprogramType; //非必填,小程序的类型,默认正式版(3),可选测试版(1)、开发版(0)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@ -137,16 +140,17 @@ __attribute__((visibility("default"))) @interface QQApiMiniProgramLaunchObject :
|
|||||||
</TABLE>
|
</TABLE>
|
||||||
*/
|
*/
|
||||||
__attribute__((visibility("default"))) @interface QQApiResultObject : QQApiObject
|
__attribute__((visibility("default"))) @interface QQApiResultObject : QQApiObject
|
||||||
@property(nonatomic,retain) NSString* error; ///<错误
|
@property (nonatomic, copy) NSString *error; ///<错误
|
||||||
@property(nonatomic,retain) NSString* errorDescription; ///<错误描述
|
@property (nonatomic, copy) NSString *errorDescription; ///<错误描述
|
||||||
@property(nonatomic,retain) NSString* extendInfo; ///<扩展信息
|
@property (nonatomic, copy) NSString *extendInfo; ///<扩展信息
|
||||||
|
@property (nonatomic, copy) NSDictionary *otherInfo; ///<其他扩展信息
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// QQApiTextObject
|
// QQApiTextObject
|
||||||
/** \brief 文本对象
|
/** \brief 文本对象
|
||||||
*/
|
*/
|
||||||
@interface QQApiTextObject : QQApiObject
|
@interface QQApiTextObject : QQApiObject
|
||||||
@property(nonatomic,retain)NSString* text; ///<文本内容,必填,最长1536个字符
|
@property (nonatomic, copy)NSString *text; ///<文本内容,必填,最长1536个字符
|
||||||
|
|
||||||
- (id)initWithText:(NSString *)text; ///<初始化方法
|
- (id)initWithText:(NSString *)text; ///<初始化方法
|
||||||
+ (id)objectWithText:(NSString *)text;///<工厂方法,获取一个QQApiTextObject对象.
|
+ (id)objectWithText:(NSString *)text;///<工厂方法,获取一个QQApiTextObject对象.
|
||||||
@ -172,19 +176,21 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
*/
|
*/
|
||||||
@property (nonatomic)QQApiURLTargetType targetContentType;
|
@property (nonatomic)QQApiURLTargetType targetContentType;
|
||||||
|
|
||||||
@property(nonatomic,retain)NSURL* url; ///<URL地址,必填,最长512个字符
|
@property (nonatomic, strong) NSURL *url; ///<URL地址,必填,最长512个字符
|
||||||
@property(nonatomic,retain)NSData* previewImageData;///<预览图像数据,最大1M字节
|
@property (nonatomic, copy) NSData *previewImageData;///<预览图像数据,最大1M字节
|
||||||
@property(nonatomic, retain) NSURL *previewImageURL; ///<预览图像URL **预览图像数据与预览图像URL可二选一
|
@property (nonatomic, strong) NSURL *previewImageURL; ///<预览图像URL **预览图像数据与预览图像URL可二选一
|
||||||
|
|
||||||
/**
|
/**
|
||||||
初始化方法
|
初始化方法
|
||||||
*/
|
*/
|
||||||
- (id)initWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data targetContentType:(QQApiURLTargetType)targetContentType;
|
- (id)initWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data targetContentType:(QQApiURLTargetType)targetContentType;
|
||||||
|
|
||||||
- (id)initWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL targetContentType:(QQApiURLTargetType)targetContentType;
|
- (id)initWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL targetContentType:(QQApiURLTargetType)targetContentType;
|
||||||
/**
|
/**
|
||||||
工厂方法,获取一个QQApiURLObject对象
|
工厂方法,获取一个QQApiURLObject对象
|
||||||
*/
|
*/
|
||||||
+ (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data targetContentType:(QQApiURLTargetType)targetContentType;
|
+ (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageData:(NSData *)data targetContentType:(QQApiURLTargetType)targetContentType;
|
||||||
|
|
||||||
+ (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL targetContentType:(QQApiURLTargetType)targetContentType;
|
+ (id)objectWithURL:(NSURL *)url title:(NSString *)title description:(NSString *)description previewImageURL:(NSURL *)previewURL targetContentType:(QQApiURLTargetType)targetContentType;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@ -193,9 +199,9 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
/** @brief 扩展数据类型
|
/** @brief 扩展数据类型
|
||||||
*/
|
*/
|
||||||
@interface QQApiExtendObject : QQApiObject
|
@interface QQApiExtendObject : QQApiObject
|
||||||
@property(nonatomic,retain) NSData* data;///<具体数据内容,必填,最大5M字节
|
@property (nonatomic, copy) NSData *data;///<具体数据内容,必填,最大5M字节
|
||||||
@property(nonatomic,retain) NSData* previewImageData;///<预览图像,最大1M字节
|
@property (nonatomic, copy) NSData *previewImageData;///<预览图像,最大1M字节
|
||||||
@property(nonatomic,retain) NSArray* imageDataArray;///图片数组(多图暂只支持分享到手机QQ收藏功能)
|
@property (nonatomic, copy) NSArray *imageDataArray;///图片数组(多图暂只支持分享到手机QQ收藏功能)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
初始化方法
|
初始化方法
|
||||||
@ -271,9 +277,11 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
@"ret=-17&error_des=account diff"//账号不一致
|
@"ret=-17&error_des=account diff"//账号不一致
|
||||||
*/
|
*/
|
||||||
@interface QQApiVideoForQQAvatarObject : QQApiExtendObject
|
@interface QQApiVideoForQQAvatarObject : QQApiExtendObject
|
||||||
@property(nonatomic, retain) NSString *assetURL;
|
@property (nonatomic, copy) NSString *assetURL;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//QQApiAuthObject 用于拉起手Q的授权详情页
|
//QQApiAuthObject 用于拉起手Q的授权详情页
|
||||||
@interface QQApiAuthObject : QQApiObject
|
@interface QQApiAuthObject : QQApiObject
|
||||||
@end
|
@end
|
||||||
@ -284,7 +292,7 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
*/
|
*/
|
||||||
@interface QQApiImageArrayForFaceCollectionObject : QQApiObject
|
@interface QQApiImageArrayForFaceCollectionObject : QQApiObject
|
||||||
|
|
||||||
@property(nonatomic,retain) NSArray* imageDataArray;///图片数组
|
@property (nonatomic, copy) NSArray *imageDataArray;///图片数组
|
||||||
|
|
||||||
/**
|
/**
|
||||||
初始化方法
|
初始化方法
|
||||||
@ -307,8 +315,8 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
*/
|
*/
|
||||||
@interface QQApiImageArrayForQZoneObject : QQApiObject
|
@interface QQApiImageArrayForQZoneObject : QQApiObject
|
||||||
|
|
||||||
@property(nonatomic,retain) NSArray* imageDataArray;///图片数组
|
@property (nonatomic, copy) NSArray *imageDataArray;///图片数组
|
||||||
@property(nonatomic,retain) NSDictionary* extMap; // 扩展字段
|
@property (nonatomic, copy) NSDictionary *extMap; // 扩展字段
|
||||||
|
|
||||||
/**
|
/**
|
||||||
初始化方法
|
初始化方法
|
||||||
@ -339,9 +347,9 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
*/
|
*/
|
||||||
@interface QQApiVideoForQZoneObject : QQApiObject
|
@interface QQApiVideoForQZoneObject : QQApiObject
|
||||||
|
|
||||||
@property(nonatomic, retain) NSString *assetURL;
|
@property (nonatomic, copy) NSString *assetURL;
|
||||||
@property(nonatomic,retain) NSDictionary* extMap; // 扩展字段
|
@property (nonatomic, copy) NSDictionary *extMap; // 扩展字段
|
||||||
@property(nonatomic,retain) NSData* videoData;
|
@property (nonatomic, copy) NSData *videoData;
|
||||||
|
|
||||||
- (id)initWithAssetURL:(NSString *)assetURL title:(NSString *)title extMap:(NSDictionary *)extMap;
|
- (id)initWithAssetURL:(NSString *)assetURL title:(NSString *)title extMap:(NSDictionary *)extMap;
|
||||||
|
|
||||||
@ -360,7 +368,7 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
*/
|
*/
|
||||||
@interface QQApiWebImageObject : QQApiObject
|
@interface QQApiWebImageObject : QQApiObject
|
||||||
|
|
||||||
@property(nonatomic, retain) NSURL *previewImageURL; ///<预览图像URL
|
@property (nonatomic, strong) NSURL *previewImageURL; ///<预览图像URL
|
||||||
|
|
||||||
/**
|
/**
|
||||||
初始化方法
|
初始化方法
|
||||||
@ -385,11 +393,12 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
/** @brief 本地文件对象(暂只支持分享到手机QQ数据线功能)
|
/** @brief 本地文件对象(暂只支持分享到手机QQ数据线功能)
|
||||||
用于分享文件内容的对象,是一个指定为文件类型的<code>QQApiExtendObject</code>
|
用于分享文件内容的对象,是一个指定为文件类型的<code>QQApiExtendObject</code>
|
||||||
*/
|
*/
|
||||||
@interface QQApiFileObject : QQApiExtendObject
|
@interface QQApiFileObject : QQApiExtendObject {
|
||||||
{
|
|
||||||
NSString *_fileName;
|
NSString *_fileName;
|
||||||
}
|
}
|
||||||
@property(nonatomic, retain)NSString* fileName;
|
|
||||||
|
@property (nonatomic, copy)NSString *fileName;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// QQApiAudioObject
|
// QQApiAudioObject
|
||||||
@ -398,7 +407,7 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
*/
|
*/
|
||||||
@interface QQApiAudioObject : QQApiURLObject
|
@interface QQApiAudioObject : QQApiURLObject
|
||||||
|
|
||||||
@property (nonatomic, retain) NSURL *flashURL; ///<音频URL地址,最长512个字符
|
@property (nonatomic, strong) NSURL *flashURL; ///<音频URL地址,最长512个字符
|
||||||
|
|
||||||
/**
|
/**
|
||||||
获取一个autorelease的<code>QQApiAudioObject</code>
|
获取一个autorelease的<code>QQApiAudioObject</code>
|
||||||
@ -431,7 +440,7 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
*/
|
*/
|
||||||
@interface QQApiVideoObject : QQApiURLObject
|
@interface QQApiVideoObject : QQApiURLObject
|
||||||
|
|
||||||
@property (nonatomic, retain) NSURL *flashURL; ///<视频URL地址,最长512个字符
|
@property (nonatomic, strong) NSURL *flashURL; ///<视频URL地址,最长512个字符
|
||||||
|
|
||||||
/**
|
/**
|
||||||
获取一个autorelease的<code>QQApiVideoObject</code>
|
获取一个autorelease的<code>QQApiVideoObject</code>
|
||||||
@ -490,9 +499,9 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
预定义的界面布局类型
|
预定义的界面布局类型
|
||||||
*/
|
*/
|
||||||
@property (nonatomic,assign) unsigned int layoutType;
|
@property (nonatomic,assign) unsigned int layoutType;
|
||||||
@property(nonatomic,assign) NSData* previewImageData;///<预览图
|
@property (nonatomic, copy) NSData *previewImageData;///<预览图
|
||||||
@property(nonatomic,retain) NSArray* textArray;///<文本列表
|
@property (nonatomic, copy) NSArray *textArray;///<文本列表
|
||||||
@property(nonatomic,retain) NSArray* pictureDataArray;///<图片列表
|
@property (nonatomic, copy) NSArray *pictureDataArray;///<图片列表
|
||||||
+ (id)objectWithLayoutType:(int)layoutType textArray:(NSArray *)textArray pictureArray:(NSArray *)pictureArray previewImageData:(NSData *)data;
|
+ (id)objectWithLayoutType:(int)layoutType textArray:(NSArray *)textArray pictureArray:(NSArray *)pictureArray previewImageData:(NSData *)data;
|
||||||
/**
|
/**
|
||||||
将一个NSDictionary对象转化为QQApiCommomContentObject,如果无法转换,则返回空
|
将一个NSDictionary对象转化为QQApiCommomContentObject,如果无法转换,则返回空
|
||||||
@ -501,7 +510,7 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
- (NSDictionary *)toDictionary;
|
- (NSDictionary *)toDictionary;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
// QQApiExtraServiceObject;
|
// QQApiExtraServiceObject; 通用业务消息处理类(旧版,后续使用QQApiCommonServiceObject)
|
||||||
/**
|
/**
|
||||||
@brief OpenSDK扩展支持的服务,通用接口,后续会扩充能力
|
@brief OpenSDK扩展支持的服务,通用接口,后续会扩充能力
|
||||||
@param serviceID [必选] 扩展支持的服务类型ID,参考官方文档说明
|
@param serviceID [必选] 扩展支持的服务类型ID,参考官方文档说明
|
||||||
@ -511,26 +520,52 @@ __attribute__((visibility("default"))) @interface QQApiURLObject : QQApiObject
|
|||||||
@note 该接口的使用须先登录
|
@note 该接口的使用须先登录
|
||||||
*/
|
*/
|
||||||
@interface QQApiExtraServiceObject : QQApiObject
|
@interface QQApiExtraServiceObject : QQApiObject
|
||||||
@property (nonatomic,retain) NSString* serviceID;
|
@property (nonatomic, copy) NSString *serviceID;
|
||||||
@property (nonatomic,retain) NSString* openID;
|
@property (nonatomic, copy) NSString *openID;
|
||||||
@property (nonatomic,retain) NSString* toUin;
|
@property (nonatomic, copy) NSString *toUin;
|
||||||
@property (nonatomic,retain) NSDictionary* extraInfo;
|
@property (nonatomic, copy) NSDictionary *extraInfo;
|
||||||
|
|
||||||
- (id)initWithOpenID:(NSString *)openID serviceID:(NSString *)serviceID;
|
- (id)initWithOpenID:(NSString *)openID serviceID:(NSString *)serviceID;
|
||||||
+ (id)objecWithOpenID:(NSString *)openID serviceID:(NSString *)serviceID;
|
+ (id)objecWithOpenID:(NSString *)openID serviceID:(NSString *)serviceID;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QQApiCommonServiceObject; 通用业务消息处理类(新),可以适用所有的需要通过互联SDK发消息给手Q的业务去处理。
|
||||||
|
* 使用前需要申请serviceID,每个业务功能有个对应的serviceID
|
||||||
|
*/
|
||||||
|
@interface QQApiCommonServiceObject : QQApiObject
|
||||||
|
|
||||||
|
// [必选] 授权登录后对该用户的唯一标识
|
||||||
|
@property (nonatomic, copy) NSString *openID;
|
||||||
|
|
||||||
|
// [必选] 扩展支持的服务类型ID,参考官方文档说明
|
||||||
|
@property (nonatomic, copy) NSString *serviceID;
|
||||||
|
|
||||||
|
// [可选] 扩展字段,由调用方跟具体的业务方协定具体的字段
|
||||||
|
@property (nonatomic, copy) NSDictionary *extendInfo;
|
||||||
|
|
||||||
|
- (instancetype)initWithOpenID:(NSString *)openID
|
||||||
|
serviceID:(NSString *)serviceID
|
||||||
|
extendInfo:(NSDictionary *)extendInfo;
|
||||||
|
|
||||||
|
+ (instancetype)objecWithOpenID:(NSString *)openID
|
||||||
|
serviceID:(NSString *)serviceID
|
||||||
|
extendInfo:(NSDictionary *)extendInfo;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Ad item object definition
|
// Ad item object definition
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/** @brief 广告数据对象
|
/** @brief 广告数据对象
|
||||||
*/
|
*/
|
||||||
@interface QQApiAdItem : NSObject
|
@interface QQApiAdItem : NSObject
|
||||||
@property(nonatomic,retain) NSString* title; ///<名称
|
@property (nonatomic, copy) NSString *title; ///<名称
|
||||||
@property(nonatomic,retain) NSString* description;///<描述
|
@property (nonatomic, copy) NSString *description;///<描述
|
||||||
@property(nonatomic,retain) NSData* imageData;///<广告图片
|
@property (nonatomic, copy) NSData *imageData;///<广告图片
|
||||||
@property(nonatomic,retain) NSURL* target;///<广告目标链接
|
@property (nonatomic, strong) NSURL *target;///<广告目标链接
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@ -581,7 +616,7 @@ typedef NS_ENUM(NSUInteger, QQApiInterfaceRespType) {
|
|||||||
@property (nonatomic, assign) int type;
|
@property (nonatomic, assign) int type;
|
||||||
|
|
||||||
/** 扩展信息 */
|
/** 扩展信息 */
|
||||||
@property (nonatomic, assign) NSString* extendInfo;
|
@property (nonatomic, copy) NSString *extendInfo;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@ -619,12 +654,12 @@ typedef NS_ENUM(NSUInteger, QQApiInterfaceRespType) {
|
|||||||
*/
|
*/
|
||||||
+ (SendMessageToQQReq *)reqWithMiniContent:(QQApiMiniProgramObject *)miniMessage;
|
+ (SendMessageToQQReq *)reqWithMiniContent:(QQApiMiniProgramObject *)miniMessage;
|
||||||
/** 具体分享消息 */
|
/** 具体分享消息 */
|
||||||
@property (nonatomic, retain) QQApiObject *message;
|
@property (nonatomic, strong) QQApiObject *apiObject;
|
||||||
|
|
||||||
/** 支持Ark的具体分享消息 */
|
/** 支持Ark的具体分享消息 */
|
||||||
@property (nonatomic, retain) ArkObject *arkMessage;
|
@property (nonatomic, strong) ArkObject *arkObject;
|
||||||
/** 支持小程序的具体分享消息 */
|
/** 支持小程序的具体分享消息 */
|
||||||
@property (nonatomic, retain) QQApiMiniProgramObject *miniMessage;
|
@property (nonatomic, strong) QQApiMiniProgramObject *miniProgramObject;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -632,6 +667,9 @@ typedef NS_ENUM(NSUInteger, QQApiInterfaceRespType) {
|
|||||||
*/
|
*/
|
||||||
@interface SendMessageToQQResp : QQBaseResp
|
@interface SendMessageToQQResp : QQBaseResp
|
||||||
|
|
||||||
|
/** 其他扩展信息 */
|
||||||
|
@property (nonatomic, copy) NSDictionary *otherInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
创建一个SendMessageToQQResp应答实例
|
创建一个SendMessageToQQResp应答实例
|
||||||
\param result 请求处理结果
|
\param result 请求处理结果
|
||||||
@ -641,6 +679,8 @@ typedef NS_ENUM(NSUInteger, QQApiInterfaceRespType) {
|
|||||||
*/
|
*/
|
||||||
+ (SendMessageToQQResp *)respWithResult:(NSString *)result errorDescription:(NSString *)errDesp extendInfo:(NSString *)extendInfo;
|
+ (SendMessageToQQResp *)respWithResult:(NSString *)result errorDescription:(NSString *)errDesp extendInfo:(NSString *)extendInfo;
|
||||||
|
|
||||||
|
+ (SendMessageToQQResp *) respWithResult:(NSString *)result errorDescription:(NSString *)errDesp extendInfo:(NSString *)extendInfo otherInfo:(NSDictionary *)otherInfo;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -656,7 +696,57 @@ typedef NS_ENUM(NSUInteger, QQApiInterfaceRespType) {
|
|||||||
+ (ShowMessageFromQQReq *)reqWithContent:(QQApiObject *)message;
|
+ (ShowMessageFromQQReq *)reqWithContent:(QQApiObject *)message;
|
||||||
|
|
||||||
/** 具体待展现消息 */
|
/** 具体待展现消息 */
|
||||||
@property (nonatomic, retain) QQApiObject *message;
|
@property (nonatomic, strong) QQApiObject *message;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
#pragma mark --一键加群&建群&解绑群
|
||||||
|
// QQApiThirdAppBindGroupObject
|
||||||
|
/** \brief 第三方app绑定群
|
||||||
|
*/
|
||||||
|
@interface QQApiThirdAppBindGroupObject : QQApiObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *accessToken;
|
||||||
|
@property (nonatomic, copy) NSString *payToken;
|
||||||
|
@property (nonatomic, copy) NSString *pfkey;
|
||||||
|
@property (nonatomic, copy) NSString *unionID;
|
||||||
|
@property (nonatomic, copy) NSString *appDisplayName;
|
||||||
|
|
||||||
|
- (id)initWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID appDisplayName:(NSString *)appDisplayName; ///<初始化方法
|
||||||
|
+ (id)objectWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID appDisplayName:(NSString *)appDisplayName; ///<工厂方法,获取一个QQApiThirdAppBindGroupObject对象.
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
// QQApiThirdAppJoinGroupObject
|
||||||
|
/** \brief 第三方app加入群
|
||||||
|
*/
|
||||||
|
@interface QQApiThirdAppJoinGroupObject : QQApiObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *accessToken;
|
||||||
|
@property (nonatomic, copy) NSString *payToken;
|
||||||
|
@property (nonatomic, copy) NSString *pfkey;
|
||||||
|
@property (nonatomic, copy) NSString *unionID;
|
||||||
|
|
||||||
|
- (id)initWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID; ///<初始化方法
|
||||||
|
|
||||||
|
+ (id)objectWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID; ///<工厂方法,获取一个QQApiThirdAppJoinGroupObject对象.
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
// QQApiThirdAppUnBindGroupObject
|
||||||
|
/** \brief 第三方app解绑群
|
||||||
|
*/
|
||||||
|
@interface QQApiThirdAppUnBindGroupObject : QQApiObject
|
||||||
|
|
||||||
|
@property (nonatomic, copy) NSString *accessToken;
|
||||||
|
@property (nonatomic, copy) NSString *openId;
|
||||||
|
@property (nonatomic, copy) NSString *payToken;
|
||||||
|
@property (nonatomic, copy) NSString *pfkey;
|
||||||
|
@property (nonatomic, copy) NSString *unionID;
|
||||||
|
|
||||||
|
- (id)initWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID openId:(NSString *)openId appId:(NSString *)appId; ///<初始化方法
|
||||||
|
|
||||||
|
+ (id)objectWithAccessToken:(NSString *)accessToken payToken:(NSString *)payToken pfkey:(NSString *)pfkey unionID:(NSString *)unionID openId:(NSString *)openId appId:(NSString *)appId; ///<工厂方法,获取一个QQApiThirdAppBindGroupObject对象.
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
///
|
///
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import "sdkdef.h"
|
#import "SDKDef.h"
|
||||||
|
|
||||||
@protocol TencentSessionDelegate;
|
@protocol TencentSessionDelegate;
|
||||||
@protocol TencentLoginDelegate;
|
@protocol TencentLoginDelegate;
|
||||||
@ -54,7 +54,7 @@ typedef NS_ENUM(NSUInteger, TencentAuthMode) {
|
|||||||
@property(nonatomic, copy) NSDate *expirationDate;
|
@property(nonatomic, copy) NSDate *expirationDate;
|
||||||
|
|
||||||
/** 已实现的开放接口的回调委托对象 */
|
/** 已实现的开放接口的回调委托对象 */
|
||||||
@property(nonatomic, assign) id<TencentSessionDelegate> sessionDelegate;
|
@property(nonatomic, weak) id<TencentSessionDelegate> sessionDelegate;
|
||||||
|
|
||||||
/** 第三方应用在开发过程中设置的URLSchema,用于浏览器登录后后跳到第三方应用 */
|
/** 第三方应用在开发过程中设置的URLSchema,用于浏览器登录后后跳到第三方应用 */
|
||||||
@property(nonatomic, copy) NSString *localAppId;
|
@property(nonatomic, copy) NSString *localAppId;
|
||||||
@ -88,6 +88,7 @@ typedef NS_ENUM(NSUInteger, TencentAuthMode) {
|
|||||||
|
|
||||||
/** 第三方在授权登录/分享 时选择 QQ,还是TIM 。在授权前一定要指定其中一个类型*/
|
/** 第三方在授权登录/分享 时选择 QQ,还是TIM 。在授权前一定要指定其中一个类型*/
|
||||||
@property(nonatomic, assign) TencentAuthShareType authShareType;
|
@property(nonatomic, assign) TencentAuthShareType authShareType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取上次登录得到的token
|
* 获取上次登录得到的token
|
||||||
*
|
*
|
||||||
@ -191,6 +192,21 @@ typedef NS_ENUM(NSUInteger, TencentAuthMode) {
|
|||||||
universalLink:(NSString *)universalLink
|
universalLink:(NSString *)universalLink
|
||||||
delegate:(id<TencentSessionDelegate>)delegate;
|
delegate:(id<TencentSessionDelegate>)delegate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置用户是否已经授权同意授权隐私协议,在主体应用中,用户同意授权隐私协议后再初始化互联SDK,默认未同意授权
|
||||||
|
* 注意:如未同意授权隐私协议,则互联SDK的所有功能都无法使用,包括初始化!!!
|
||||||
|
* 从3.5.7版本开始支持该方法
|
||||||
|
*
|
||||||
|
* @param isAgreedAuthorization 是否已经授权,isAgreedAuthorization=YES, 表示已经同意授权;isAgreedAuthorization=NO,表示未同意授权,互联SDK的所有功能都无法使用
|
||||||
|
*/
|
||||||
|
+ (void)setIsUserAgreedAuthorization:(BOOL)isUserAgreedAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前用户是否已经同意授权隐私协议
|
||||||
|
* 从3.5.7版本开始支持该方法
|
||||||
|
*/
|
||||||
|
+ (BOOL)isUserAgreedAuthorization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断用户手机上是否安装手机QQ
|
* 判断用户手机上是否安装手机QQ
|
||||||
* \return YES:安装 NO:没安装
|
* \return YES:安装 NO:没安装
|
||||||
|
@ -16,7 +16,7 @@ FOUNDATION_EXPORT const unsigned char StaticLibraryModuleVersionString[];
|
|||||||
|
|
||||||
#import "QQApiInterface.h"
|
#import "QQApiInterface.h"
|
||||||
#import "QQApiInterfaceObject.h"
|
#import "QQApiInterfaceObject.h"
|
||||||
#import "sdkdef.h"
|
#import "SDKDef.h"
|
||||||
#import "TencentOAuth.h"
|
#import "TencentOAuth.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -248,6 +248,9 @@ FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgWebPage;
|
|||||||
/** 设置头像图片过大 */
|
/** 设置头像图片过大 */
|
||||||
FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgUserHeadPicLarge;
|
FOUNDATION_EXTERN NSString * const TCOpenSDKErrorMsgUserHeadPicLarge;
|
||||||
|
|
||||||
|
/** 用户未同意授权隐私协议 */
|
||||||
|
FOUNDATION_EXPORT NSString * const TCOpenSDKErrorMsgUserNotAgreedAuthorization;
|
||||||
|
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Binary file not shown.
@ -18,7 +18,7 @@ A powerful Flutter plugin allowing developers to auth/share with natvie Android
|
|||||||
s.dependency 'Flutter'
|
s.dependency 'Flutter'
|
||||||
s.platform = :ios, '8.0'
|
s.platform = :ios, '8.0'
|
||||||
|
|
||||||
# v3.5.3
|
# v3.5.10
|
||||||
s.subspec 'vendor' do |sp|
|
s.subspec 'vendor' do |sp|
|
||||||
sp.vendored_frameworks = 'Libraries/*.framework'
|
sp.vendored_frameworks = 'Libraries/*.framework'
|
||||||
sp.frameworks = 'Security', 'SystemConfiguration', 'CoreGraphics', 'CoreTelephony', 'WebKit'
|
sp.frameworks = 'Security', 'SystemConfiguration', 'CoreGraphics', 'CoreTelephony', 'WebKit'
|
||||||
|
@ -43,26 +43,35 @@ class Tencent {
|
|||||||
|
|
||||||
static const String _SCHEME_FILE = 'file';
|
static const String _SCHEME_FILE = 'file';
|
||||||
|
|
||||||
late final MethodChannel _channel =
|
late final MethodChannel _channel = const MethodChannel('v7lin.github.io/tencent_kit')..setMethodCallHandler(_handleMethod);
|
||||||
const MethodChannel('v7lin.github.io/tencent_kit')
|
|
||||||
..setMethodCallHandler(_handleMethod);
|
|
||||||
|
|
||||||
final StreamController<BaseResp> _respStreamController =
|
final StreamController<BaseResp> _respStreamController = StreamController<BaseResp>.broadcast();
|
||||||
StreamController<BaseResp>.broadcast();
|
|
||||||
|
|
||||||
Future<dynamic> _handleMethod(MethodCall call) async {
|
Future<dynamic> _handleMethod(MethodCall call) async {
|
||||||
switch (call.method) {
|
switch (call.method) {
|
||||||
case _METHOD_ONLOGINRESP:
|
case _METHOD_ONLOGINRESP:
|
||||||
_respStreamController.add(LoginResp.fromJson(
|
_respStreamController.add(LoginResp.fromJson((call.arguments as Map<dynamic, dynamic>).cast<String, dynamic>()));
|
||||||
(call.arguments as Map<dynamic, dynamic>).cast<String, dynamic>()));
|
|
||||||
break;
|
break;
|
||||||
case _METHOD_ONSHARERESP:
|
case _METHOD_ONSHARERESP:
|
||||||
_respStreamController.add(ShareMsgResp.fromJson(
|
_respStreamController.add(ShareMsgResp.fromJson((call.arguments as Map<dynamic, dynamic>).cast<String, dynamic>()));
|
||||||
(call.arguments as Map<dynamic, dynamic>).cast<String, dynamic>()));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 设置是否已授权获取设备信息/是否同意隐私协议
|
||||||
|
Future<void> setIsPermissionGranted({
|
||||||
|
required bool granted,
|
||||||
|
String? buildModel /* android.os.Build.MODEL */,
|
||||||
|
}) {
|
||||||
|
return _channel.invokeMethod(
|
||||||
|
'setIsPermissionGranted',
|
||||||
|
<String, dynamic>{
|
||||||
|
'granted': granted,
|
||||||
|
if (buildModel?.isNotEmpty ?? false) 'build_model': buildModel,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/// 向 Open_SDK 注册
|
/// 向 Open_SDK 注册
|
||||||
Future<void> registerApp({
|
Future<void> registerApp({
|
||||||
required String appId,
|
required String appId,
|
||||||
@ -72,22 +81,7 @@ class Tencent {
|
|||||||
_METHOD_REGISTERAPP,
|
_METHOD_REGISTERAPP,
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
_ARGUMENT_KEY_APPID: appId,
|
_ARGUMENT_KEY_APPID: appId,
|
||||||
if (universalLink?.isNotEmpty ?? false)
|
if (universalLink?.isNotEmpty ?? false) _ARGUMENT_KEY_UNIVERSALLINK: universalLink,
|
||||||
_ARGUMENT_KEY_UNIVERSALLINK: universalLink,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 设置是否已授权获取设备信息
|
|
||||||
Future<void> setIsPermissionGranted({
|
|
||||||
required bool granted,
|
|
||||||
String? buildModel,
|
|
||||||
}) {
|
|
||||||
return _channel.invokeMethod(
|
|
||||||
'setIsPermissionGranted',
|
|
||||||
<String, dynamic>{
|
|
||||||
'granted': granted,
|
|
||||||
if (buildModel?.isNotEmpty ?? false) 'build_model': buildModel,
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -133,18 +127,14 @@ class Tencent {
|
|||||||
}) {
|
}) {
|
||||||
assert(scene == TencentScene.SCENE_QZONE);
|
assert(scene == TencentScene.SCENE_QZONE);
|
||||||
assert((summary?.isNotEmpty ?? false) ||
|
assert((summary?.isNotEmpty ?? false) ||
|
||||||
((imageUris?.isNotEmpty ?? false) &&
|
((imageUris?.isNotEmpty ?? false) && imageUris!.every((Uri element) => element.isScheme(_SCHEME_FILE))) ||
|
||||||
imageUris!
|
|
||||||
.every((Uri element) => element.isScheme(_SCHEME_FILE))) ||
|
|
||||||
(videoUri != null && videoUri.isScheme(_SCHEME_FILE)));
|
(videoUri != null && videoUri.isScheme(_SCHEME_FILE)));
|
||||||
return _channel.invokeMethod<void>(
|
return _channel.invokeMethod<void>(
|
||||||
_METHOD_SHAREMOOD,
|
_METHOD_SHAREMOOD,
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
_ARGUMENT_KEY_SCENE: scene,
|
_ARGUMENT_KEY_SCENE: scene,
|
||||||
if (summary?.isNotEmpty ?? false) _ARGUMENT_KEY_SUMMARY: summary,
|
if (summary?.isNotEmpty ?? false) _ARGUMENT_KEY_SUMMARY: summary,
|
||||||
if (imageUris?.isNotEmpty ?? false)
|
if (imageUris?.isNotEmpty ?? false) _ARGUMENT_KEY_IMAGEURIS: imageUris!.map((Uri imageUri) => imageUri.toString()).toList(),
|
||||||
_ARGUMENT_KEY_IMAGEURIS:
|
|
||||||
imageUris!.map((Uri imageUri) => imageUri.toString()).toList(),
|
|
||||||
if (videoUri != null) _ARGUMENT_KEY_VIDEOURI: videoUri.toString(),
|
if (videoUri != null) _ARGUMENT_KEY_VIDEOURI: videoUri.toString(),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: tencent_kit
|
name: tencent_kit
|
||||||
description: A powerful Flutter plugin allowing developers to auth/share with natvie Android & iOS Tencent SDKs.
|
description: A powerful Flutter plugin allowing developers to auth/share with natvie Android & iOS Tencent SDKs.
|
||||||
version: 3.0.0
|
version: 3.1.0
|
||||||
# author: v7lin <v7lin@qq.com>
|
# author: v7lin <v7lin@qq.com>
|
||||||
homepage: https://github.com/v7lin/fake_tencent
|
homepage: https://github.com/v7lin/fake_tencent
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user