Skip to content

Commit

Permalink
3.3.4 iOS16 适配,建议尽快更新
Browse files Browse the repository at this point in the history
  • Loading branch information
xingda committed Sep 9, 2022
1 parent 8c12578 commit 084ae42
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 53 deletions.
Binary file modified .DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,12 @@ the server cannot be made."这样的问题。
# 3.3.3下线获取设备信息

注意:sdk不再获取用户设备信息,如果:idfa、idfv等

# 3.3.4 iOS16 适配
更新内容:

1. 修改底层跳转逻辑
2. 修改底层数据传输逻辑
3. 适配iOS16
4. 解决当前已知bug
5. 去掉了+ (void)checkUniversalLink:(void (^_Nullable)(WBULCheckStep step, NSError * _Nullable error))checkBlock api
16 changes: 0 additions & 16 deletions WeiboSDKDemo/SendMessageToWeiboViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,6 @@ - (void)viewDidLoad
self.shareButton.frame = CGRectMake(80, 410, 90, 50);
[scrollView addSubview:self.shareButton];


UIButton *checkLinkBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
checkLinkBtn.titleLabel.numberOfLines = 0;
checkLinkBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
[checkLinkBtn setTitle:NSLocalizedString(@"检查UniversalLink是否有效", nil) forState:UIControlStateNormal];
[checkLinkBtn addTarget:self action:@selector(clickUniversalLinkBtn) forControlEvents:UIControlEventTouchUpInside];
checkLinkBtn.frame = CGRectMake(210, 360, 90, 80);
[scrollView addSubview:checkLinkBtn];


UIButton *linkWeiboButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[linkWeiboButton setTitle:NSLocalizedString(@"链接到微博API Demo", nil) forState:UIControlStateNormal];
[linkWeiboButton addTarget:self action:@selector(linkToWeiboAPI) forControlEvents:UIControlEventTouchUpInside];
Expand Down Expand Up @@ -372,12 +362,6 @@ - (BOOL)hasImageShare{
return NO;
}

- (void)clickUniversalLinkBtn{
[WeiboSDK checkUniversalLink:^(WBULCheckStep step, NSError *error) {
NSLog(@"step == %ld errorCode=%ld errorReason=%@",(long)step,(long)error.code,error.localizedDescription);
}];
}

/*- (void)sharePanoramic{
WBMessageObject *message = [WBMessageObject message];
WBImageObject *imageObject = [WBImageObject object];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>WeiboSDKLibDemo.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
4 changes: 2 additions & 2 deletions Weibo_SDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Pod::Spec.new do |s|
New weibosdk pod.
DESC
s.author = { "jinrun" => "[email protected]" }
s.version = "3.3.2"
s.source = { :git => "https://github.com/sinaweibosdk/weibo_ios_sdk.git", :tag => "3.3.2" }
s.version = "3.3.4"
s.source = { :git => "https://github.com/sinaweibosdk/weibo_ios_sdk.git", :tag => "3.3.4" }
s.platform = :ios, '9.0'
s.requires_arc = false
s.license = 'MIT'
Expand Down
Binary file added iOS平台SDK文档V3.3.4.pdf
Binary file not shown.
Binary file modified libWeiboSDK/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion libWeiboSDK/WBHttpRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
@param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应
@param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回
*/

+ (WBHttpRequest *)requestWithAccessToken:(NSString *)accessToken
url:(NSString *)url
httpMethod:(NSString *)httpMethod
Expand Down
44 changes: 10 additions & 34 deletions libWeiboSDK/WeiboSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,12 @@ typedef NS_ENUM(NSInteger, WeiboSDKResponseStatusCode)
WeiboSDKResponseStatusCodeSentFail = -2,//发送失败
WeiboSDKResponseStatusCodeAuthDeny = -3,//授权失败
WeiboSDKResponseStatusCodeUserCancelInstall = -4,//用户取消安装微博客户端
WeiboSDKResponseStatusCodePasteboardUnenable = -6,//剪贴板未授权
WeiboSDKResponseStatusCodeShareInSDKFailed = -8,//分享失败 详情见response UserInfo
WeiboSDKResponseStatusCodeUnsupport = -99,//不支持的请求
WeiboSDKResponseStatusCodeUnknown = -100,
};

typedef NS_ENUM(NSInteger, WBULCheckStep)
{
WBULCheckStepNone = 0, //默认
WBULCheckStepParams = 1, //参数检查
WBULCheckStepSystemVersion = 2, //当前系统版本检查
WBULCheckStepWeiboVersion = 3, //微博客户端版本检查
WBULCheckStepSDKInnerOperation = 4, //微博SDK内部操作检查
WBULCheckStepLaunchWeibo = 5, //App拉起微博检查
WBULCheckStepBackToCurrentApp = 6, //由微博返回当前App检查
WBULCheckStepFinal = 7 //最终检查,也代表检测结果合法有效
};

@protocol WeiboSDKDelegate;
@protocol WBHttpRequestDelegate;
@class WBBaseRequest;
Expand Down Expand Up @@ -75,25 +64,18 @@ typedef NS_ENUM(NSInteger, WBULCheckStep)
*/
+ (BOOL)openWeiboApp;


/**
获取微博客户端程序的itunes安装地址
@return 微博客户端程序的itunes安装地址
*/
+ (NSString *_Nullable)getWeiboAppInstallUrl;

/**
getSDKVersion 已弃用
getSDKVersion
获取sdk版本号使用 getWeiboSDKVersion
*/
+ (NSString *_Nullable)getSDKVersion;

/**
新的获取当前微博SDK的版本号
@return 当前微博SDK的版本号
*/
+ (NSString *_Nullable)getWeiboSDKVersion;

/**
向微博客户端程序注册第三方应用
@param appKey 微博开放平台第三方应用appKey
Expand All @@ -102,12 +84,6 @@ typedef NS_ENUM(NSInteger, WBULCheckStep)
*/
+ (BOOL)registerApp:(NSString * __nonnull)appKey universalLink:(NSString * __nonnull)universalLink;

/**
step:检测的步骤
error:universalLink是否有效,error为nil universalLink有效,不为nil为无效universalLink
*/
+ (void)checkUniversalLink:(void (^_Nullable)(WBULCheckStep step, NSError * _Nullable error))checkBlock;

/**
处理微博客户端程序通过URL启动第三方应用时传递的数据
Expand Down Expand Up @@ -137,7 +113,7 @@ typedef NS_ENUM(NSInteger, WBULCheckStep)
@see [WeiboSDKDelegate didReceiveWeiboResponse:]
@see WBBaseResponse
@param completion 调用结果回调block
@param completion 调用结果在主线程回调block
*/
+ (void)sendRequest:(WBBaseRequest *_Nullable)request completion:(void (^ __nullable)(BOOL success))completion;

Expand All @@ -148,7 +124,7 @@ typedef NS_ENUM(NSInteger, WBULCheckStep)
@param response 具体的应答内容
@see WBBaseRequest
@param completion 调用结果回调block
@param completion 调用结果在主线程回调block
*/
+ (void)sendResponse:(WBBaseResponse *_Nullable)response completion:(void (^ __nullable)(BOOL success))completion;

Expand Down Expand Up @@ -595,7 +571,7 @@ typedef NS_ENUM(NSInteger, WBSDKMediaTransferErrorCode)
/**
是否分享到story
*/
@property (nonatomic) BOOL isShareToStory DEPRECATED_MSG_ATTRIBUTE("shareToStory is deprecated");
@property (nonatomic) BOOL isShareToStory DEPRECATED_MSG_ATTRIBUTE("shareToStory is no longer being maintained");

/**
返回一个 WBImageObject 对象
Expand Down Expand Up @@ -652,7 +628,7 @@ typedef NS_ENUM(NSInteger, WBSDKMediaTransferErrorCode)
/**
是否分享到story
*/
@property (nonatomic) BOOL isShareToStory DEPRECATED_MSG_ATTRIBUTE("shareToStory is deprecated");
@property (nonatomic) BOOL isShareToStory DEPRECATED_MSG_ATTRIBUTE("shareToStory is no longer being maintained");

/**
多图分享委托
Expand Down Expand Up @@ -702,13 +678,13 @@ typedef NS_ENUM(NSInteger, WBSDKMediaTransferErrorCode)
当第三方应用分享多媒体内容到微博时,应该将此参数设置为被分享的内容在自己的系统中的唯一标识
@warning 不能为空,长度小于255
*/
@property (nonatomic, strong) NSString * _Nullable objectID;
@property (nonatomic, strong) NSString * _Nonnull objectID;

/**
多媒体内容标题
@warning 不能为空且长度小于1k
*/
@property (nonatomic, strong) NSString * _Nullable title;
@property (nonatomic, strong) NSString * _Nonnull title;

/**
多媒体内容描述
Expand All @@ -733,7 +709,7 @@ typedef NS_ENUM(NSInteger, WBSDKMediaTransferErrorCode)
@return 返回一个*自动释放的*WBBaseMediaObject对象
*/
+ (id _Nullable )object DEPRECATED_MSG_ATTRIBUTE("WBBaseMediaObject is deprecated");
+ (id _Nullable )object DEPRECATED_MSG_ATTRIBUTE("WBBaseMediaObject is no longer being maintained");

@end

Expand All @@ -750,7 +726,7 @@ typedef NS_ENUM(NSInteger, WBSDKMediaTransferErrorCode)
@warning 不能为空且长度不能超过255
*/
@property (nonatomic, strong) NSString * _Nullable webpageUrl DEPRECATED_MSG_ATTRIBUTE("webpageUrl is deprecated");
@property (nonatomic, strong) NSString * _Nullable webpageUrl DEPRECATED_MSG_ATTRIBUTE("webpageUrl is no longer being maintained");

@end

Expand Down
Binary file modified libWeiboSDK/libWeiboSDK.a
Binary file not shown.
Binary file removed 微博iOS平台SDK文档V3.3.3.pdf
Binary file not shown.

0 comments on commit 084ae42

Please sign in to comment.