升级SDK版本
This commit is contained in:
parent
5c64d1dfda
commit
e6dc6cd2f9
@ -24,6 +24,7 @@ flutter版新浪微博SDK
|
||||
* [iOS 应用接入](https://open.weibo.com/wiki/Sdk/ios)
|
||||
* [Android Github](https://github.com/sinaweibosdk/weibo_android_sdk)
|
||||
* [iOS Github](https://github.com/sinaweibosdk/weibo_ios_sdk)
|
||||
* [Universal Links](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content)
|
||||
|
||||
## android
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
group 'io.github.v7lin.weibo_kit'
|
||||
version '2.0.1'
|
||||
version '2.0.2'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
@ -17,9 +17,9 @@ rootProject.allprojects {
|
||||
google()
|
||||
jcenter()
|
||||
|
||||
// weibo
|
||||
maven {
|
||||
url 'https://dl.bintray.com/thelasterstar/maven/'
|
||||
// 私仓
|
||||
flatDir {
|
||||
dirs project(':weibo_kit').file('libs')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -53,7 +53,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// v9.12.0
|
||||
// v10.10.0
|
||||
vendorImplementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
vendorImplementation 'com.sina.weibo.sdk:core:9.12.0:openDefaultRelease@aar'
|
||||
vendorImplementation(name: 'openDefault-10.10.0', ext: 'aar')
|
||||
}
|
||||
|
BIN
android/libs/openDefault-10.10.0.aar
Normal file
BIN
android/libs/openDefault-10.10.0.aar
Normal file
Binary file not shown.
@ -8,13 +8,13 @@ PODS:
|
||||
- sqflite (0.0.2):
|
||||
- Flutter
|
||||
- FMDB (>= 2.7.5)
|
||||
- weibo_kit (2.0.1):
|
||||
- weibo_kit (2.0.2):
|
||||
- Flutter
|
||||
- weibo_kit/vendor (= 2.0.1)
|
||||
- weibo_kit/vendor (2.0.1):
|
||||
- weibo_kit/vendor (= 2.0.2)
|
||||
- weibo_kit/vendor (2.0.2):
|
||||
- Flutter
|
||||
- Weibo_SDK (~> 3.2.7)
|
||||
- Weibo_SDK (3.2.7)
|
||||
- Weibo_SDK (~> 3.3.0)
|
||||
- Weibo_SDK (3.3.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
@ -42,8 +42,8 @@ SPEC CHECKSUMS:
|
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
|
||||
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
||||
weibo_kit: 173edbfbab7b05cc9c64a7c365ea331f3c5c0797
|
||||
Weibo_SDK: 5a4d08f7e1fedbb635435e4585c8c0439c7da089
|
||||
weibo_kit: 4a56eb617b67edb586e294fb52658e67b4285500
|
||||
Weibo_SDK: 7478846cccb43c4785ba76b214115fb7ec9dc0d4
|
||||
|
||||
PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d
|
||||
|
||||
|
@ -311,7 +311,6 @@
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
@ -389,7 +388,6 @@
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
@ -445,7 +443,6 @@
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
|
@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
@ -8,6 +8,7 @@ import 'package:image/image.dart' as image;
|
||||
import 'package:weibo_kit/weibo_kit.dart';
|
||||
|
||||
const String _WEIBO_APP_KEY = 'your weibo app key';
|
||||
const String _WEIBO_UNIVERSAL_LINK = 'your weibo universal link';
|
||||
const List<String> _WEIBO_SCOPE = <String>[
|
||||
WeiboScope.ALL,
|
||||
];
|
||||
@ -16,6 +17,7 @@ void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
Weibo.instance.registerApp(
|
||||
appKey: _WEIBO_APP_KEY,
|
||||
universalLink: _WEIBO_UNIVERSAL_LINK,
|
||||
scope: _WEIBO_SCOPE,
|
||||
);
|
||||
runApp(MyApp());
|
||||
|
@ -14,7 +14,7 @@ packages:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.5.0"
|
||||
version: "2.6.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -239,7 +239,7 @@ packages:
|
||||
name: source_span
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
version: "1.8.1"
|
||||
sqflite:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -295,7 +295,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.2.19"
|
||||
version: "0.3.0"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -323,7 +323,7 @@ packages:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.0.1"
|
||||
version: "2.0.2"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -29,6 +29,7 @@ static NSString *const METHOD_ONAUTHRESP = @"onAuthResp";
|
||||
static NSString *const METHOD_ONSHAREMSGRESP = @"onShareMsgResp";
|
||||
|
||||
static NSString *const ARGUMENT_KEY_APPKEY = @"appKey";
|
||||
static NSString *const ARGUMENT_KEY_UNIVERSALLINK = @"universalLink";
|
||||
static NSString *const ARGUMENT_KEY_SCOPE = @"scope";
|
||||
static NSString *const ARGUMENT_KEY_REDIRECTURL = @"redirectUrl";
|
||||
static NSString *const ARGUMENT_KEY_TEXT = @"text";
|
||||
@ -58,7 +59,8 @@ static NSString *const ARGUMENT_KEY_RESULT_EXPIRESIN = @"expiresIn";
|
||||
result:(FlutterResult)result {
|
||||
if ([METHOD_REGISTERAPP isEqualToString:call.method]) {
|
||||
NSString *appKey = call.arguments[ARGUMENT_KEY_APPKEY];
|
||||
[WeiboSDK registerApp:appKey];
|
||||
NSString *universalLink = call.arguments[ARGUMENT_KEY_UNIVERSALLINK];
|
||||
[WeiboSDK registerApp:appKey universalLink:universalLink];
|
||||
result(nil);
|
||||
} else if ([METHOD_ISINSTALLED isEqualToString:call.method]) {
|
||||
result([NSNumber numberWithBool:[WeiboSDK isWeiboAppInstalled]]);
|
||||
@ -80,7 +82,9 @@ static NSString *const ARGUMENT_KEY_RESULT_EXPIRESIN = @"expiresIn";
|
||||
request.redirectURI = call.arguments[ARGUMENT_KEY_REDIRECTURL];
|
||||
request.shouldShowWebViewForAuthIfCannotSSO = YES;
|
||||
request.shouldOpenWeiboAppInstallPageIfNotInstalled = NO;
|
||||
[WeiboSDK sendRequest:request];
|
||||
[WeiboSDK sendRequest:request completion:^(BOOL success) {
|
||||
// do nothing
|
||||
}];
|
||||
result(nil);
|
||||
}
|
||||
|
||||
@ -89,7 +93,9 @@ static NSString *const ARGUMENT_KEY_RESULT_EXPIRESIN = @"expiresIn";
|
||||
WBMessageObject *message = [WBMessageObject message];
|
||||
message.text = call.arguments[ARGUMENT_KEY_TEXT];
|
||||
request.message = message;
|
||||
[WeiboSDK sendRequest:request];
|
||||
[WeiboSDK sendRequest:request completion:^(BOOL success) {
|
||||
// do nothing
|
||||
}];
|
||||
result(nil);
|
||||
}
|
||||
|
||||
@ -121,7 +127,9 @@ static NSString *const ARGUMENT_KEY_RESULT_EXPIRESIN = @"expiresIn";
|
||||
message.mediaObject = object;
|
||||
}
|
||||
request.message = message;
|
||||
[WeiboSDK sendRequest:request];
|
||||
[WeiboSDK sendRequest:request completion:^(BOOL success) {
|
||||
// do nothing
|
||||
}];
|
||||
result(nil);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'weibo_kit'
|
||||
s.version = '2.0.1'
|
||||
s.version = '2.0.2'
|
||||
s.summary = 'A powerful Flutter plugin allowing developers to auth/share with natvie Android & iOS Weibo SDKs.'
|
||||
s.description = <<-DESC
|
||||
A powerful Flutter plugin allowing developers to auth/share with natvie Android & iOS Weibo SDKs.
|
||||
@ -18,10 +18,10 @@ A powerful Flutter plugin allowing developers to auth/share with natvie Android
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '9.0'
|
||||
|
||||
# v3.2.7
|
||||
# v3.3.0
|
||||
s.static_framework = true
|
||||
s.subspec 'vendor' do |sp|
|
||||
sp.dependency 'Weibo_SDK', '~> 3.2.7'
|
||||
sp.dependency 'Weibo_SDK', '~> 3.3.0'
|
||||
end
|
||||
|
||||
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
|
||||
|
@ -27,6 +27,7 @@ class Weibo {
|
||||
static const String _METHOD_ONSHAREMSGRESP = 'onShareMsgResp';
|
||||
|
||||
static const String _ARGUMENT_KEY_APPKEY = 'appKey';
|
||||
static const String _ARGUMENT_KEY_UNIVERSALLINK = 'universalLink';
|
||||
static const String _ARGUMENT_KEY_SCOPE = 'scope';
|
||||
static const String _ARGUMENT_KEY_REDIRECTURL = 'redirectUrl';
|
||||
static const String _ARGUMENT_KEY_TEXT = 'text';
|
||||
@ -54,14 +55,17 @@ class Weibo {
|
||||
|
||||
Future<void> registerApp({
|
||||
required String appKey,
|
||||
required String? universalLink,
|
||||
required List<String> scope,
|
||||
String redirectUrl =
|
||||
_DEFAULT_REDIRECTURL, // 新浪微博开放平台 -> 我的应用 -> 应用信息 -> 高级信息 -> OAuth2.0授权设置
|
||||
}) {
|
||||
assert(!Platform.isIOS || (universalLink?.isNotEmpty ?? false));
|
||||
return _channel.invokeMethod<void>(
|
||||
_METHOD_REGISTERAPP,
|
||||
<String, dynamic>{
|
||||
_ARGUMENT_KEY_APPKEY: appKey,
|
||||
_ARGUMENT_KEY_UNIVERSALLINK: universalLink,
|
||||
_ARGUMENT_KEY_SCOPE: scope.join(','),
|
||||
_ARGUMENT_KEY_REDIRECTURL: redirectUrl,
|
||||
},
|
||||
@ -189,6 +193,7 @@ class Weibo {
|
||||
}
|
||||
|
||||
/// 分享 - 网页
|
||||
@Deprecated('iOS:分享多媒体已经弃用 请不要用相关api')
|
||||
Future<void> shareWebpage({
|
||||
required String title,
|
||||
required String description,
|
||||
|
@ -28,7 +28,7 @@ packages:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.5.0"
|
||||
version: "2.6.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -351,7 +351,7 @@ packages:
|
||||
name: source_span
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
version: "1.8.1"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -393,7 +393,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.2.19"
|
||||
version: "0.3.0"
|
||||
timing:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: weibo_kit
|
||||
description: A powerful Flutter plugin allowing developers to auth/share with natvie Android & iOS Weibo SDKs.
|
||||
version: 2.0.1
|
||||
version: 2.0.2
|
||||
# author: v7lin <v7lin@qq.com>
|
||||
homepage: https://github.com/rxreader/weibo_kit.git
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user