MobClub / ShareSDK3.x-for-iOS

ShareSDK 3.x for iOS
111 stars 26 forks source link

ATS 支持 #25

Closed EkkoG closed 7 years ago

EkkoG commented 7 years ago

目前 ShareSDK 中还有一些请求是通过 HTTP 方式而非 HTTPS,根据苹果的政策,2017 年 1 月 1 日开始,所有的新提交 app 默认是不允许使用 NSAllowsArbitraryLoads 来绕过 ATS 限制,希望将 SDK 内部的请求替换成 HTTPS 方式。 附:http://onevcat.com/2016/06/ios-10-ats/

JinghuangLiu commented 7 years ago

内部的SDK请求会自动根据ATS转换https协议——这个我们一年前适配iOS9时就做了。

发自我的 iPhone

在 2016年12月8日,下午4:04,Kevin notifications@github.com 写道:

目前 ShareSDK 中还有一些请求是通过 HTTP 方式而非 HTTPS,根据苹果的政策,2017 年 1 月 1 日开始,所有的新提交 app 默认是不允许使用 NSAllowsArbitraryLoads 来绕过 ATS 限制,希望将 SDK 内部的请求替换成 HTTPS 方式。 附:http://onevcat.com/2016/06/ios-10-ats/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

EkkoG commented 7 years ago

意思是不用 NSAllowsArbitraryLoads 来绕过的话,会自动通过 HTTPS 方式请求吗?

JinghuangLiu commented 7 years ago

是的

发自我的 iPhone

在 2016年12月8日,下午4:09,Kevin notifications@github.com 写道:

意思是不用 NSAllowsArbitraryLoads 来绕过的话,会自动通过 HTTPS 方式请求吗?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

EkkoG commented 7 years ago

好的,谢谢

EkkoG commented 7 years ago

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

JinghuangLiu commented 7 years ago

主流平台目前只有新浪微博的网页授权还有点问题——这个是新浪微博开放接口问题。

发自我的 iPhone

在 2016年12月8日,下午5:04,Kevin notifications@github.com 写道:

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

EkkoG commented 7 years ago

微信似乎没有说明有没有适配吧,简单测试了一下登录和分享是可以的。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午5:57:34, 刘靖煌 (notifications@github.com) wrote:

主流平台目前只有新浪微博的网页授权还有点问题——这个是新浪微博开放接口问题。

发自我的 iPhone

在 2016年12月8日,下午5:04,Kevin notifications@github.com 写道:

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265700274, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_jvapD77HHJOsbIWpOrRmXG_IupBHbks5rF9SNgaJpZM4LHih0 .

JinghuangLiu commented 7 years ago

微信有说明。

发自我的 iPhone

在 2016年12月8日,下午6:01,Kevin notifications@github.com 写道:

微信似乎没有说明有没有适配吧,简单测试了一下登录和分享是可以的。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午5:57:34, 刘靖煌 (notifications@github.com) wrote:

主流平台目前只有新浪微博的网页授权还有点问题——这个是新浪微博开放接口问题。

发自我的 iPhone

在 2016年12月8日,下午5:04,Kevin notifications@github.com 写道:

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265700274, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_jvapD77HHJOsbIWpOrRmXG_IupBHbks5rF9SNgaJpZM4LHih0 . — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

EkkoG commented 7 years ago

可以给个链接吗,我没找到相关说明,看一下比较放心。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午6:10:11, 刘靖煌 (notifications@github.com) wrote:

微信有说明。

发自我的 iPhone

在 2016年12月8日,下午6:01,Kevin notifications@github.com 写道:

微信似乎没有说明有没有适配吧,简单测试了一下登录和分享是可以的。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午5:57:34, 刘靖煌 (notifications@github.com) wrote:

主流平台目前只有新浪微博的网页授权还有点问题——这个是新浪微博开放接口问题。

发自我的 iPhone

在 2016年12月8日,下午5:04,Kevin notifications@github.com 写道:

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265700274 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AC_jvapD77HHJOsbIWpOrRmXG_IupBHbks5rF9SNgaJpZM4LHih0

. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265702994, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_jvTnFdk4g2EhL0pZM72-us0zPiKJRks5rF9eBgaJpZM4LHih0 .

JinghuangLiu commented 7 years ago

https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&lang=zh_CN https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&lang=zh_CN

下载他们SDK,里面的ReadMe文件

在 2016年12月8日,下午6:25,Kevin notifications@github.com 写道:

可以给个链接吗,我没找到相关说明,看一下比较放心。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午6:10:11, 刘靖煌 (notifications@github.com) wrote:

微信有说明。

发自我的 iPhone

在 2016年12月8日,下午6:01,Kevin notifications@github.com 写道:

微信似乎没有说明有没有适配吧,简单测试了一下登录和分享是可以的。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午5:57:34, 刘靖煌 (notifications@github.com) wrote:

主流平台目前只有新浪微博的网页授权还有点问题——这个是新浪微博开放接口问题。

发自我的 iPhone

在 2016年12月8日,下午5:04,Kevin notifications@github.com 写道:

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265700274 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AC_jvapD77HHJOsbIWpOrRmXG_IupBHbks5rF9SNgaJpZM4LHih0

. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265702994, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_jvTnFdk4g2EhL0pZM72-us0zPiKJRks5rF9eBgaJpZM4LHih0 . — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265706198, or mute the thread https://github.com/notifications/unsubscribe-auth/AGnAtaXaSA4fDurI86uWfKLOCg6OMEduks5rF9sEgaJpZM4LHih0.

JinghuangLiu commented 7 years ago

我们下周会更新个新版本。微信、QQ SDK都有更新。

发自我的 iPhone

在 2016年12月8日,下午6:25,Kevin notifications@github.com 写道:

可以给个链接吗,我没找到相关说明,看一下比较放心。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午6:10:11, 刘靖煌 (notifications@github.com) wrote:

微信有说明。

发自我的 iPhone

在 2016年12月8日,下午6:01,Kevin notifications@github.com 写道:

微信似乎没有说明有没有适配吧,简单测试了一下登录和分享是可以的。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午5:57:34, 刘靖煌 (notifications@github.com) wrote:

主流平台目前只有新浪微博的网页授权还有点问题——这个是新浪微博开放接口问题。

发自我的 iPhone

在 2016年12月8日,下午5:04,Kevin notifications@github.com 写道:

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265700274 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AC_jvapD77HHJOsbIWpOrRmXG_IupBHbks5rF9SNgaJpZM4LHih0

. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265702994, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_jvTnFdk4g2EhL0pZM72-us0zPiKJRks5rF9eBgaJpZM4LHih0 . — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

EkkoG commented 7 years ago

3.5.3 版本中,有腾讯SDK 的 3.1.3 版本吗,腾讯在 3.1.3 中全面使用了 HTTPS,ShareSDK 哪个版本会支持这个版本的腾讯SDK?

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午6:30:05, 刘靖煌 (notifications@github.com) wrote:

我们下周会更新个新版本。微信、QQ SDK都有更新。

发自我的 iPhone

在 2016年12月8日,下午6:25,Kevin notifications@github.com 写道:

可以给个链接吗,我没找到相关说明,看一下比较放心。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午6:10:11, 刘靖煌 (notifications@github.com) wrote:

微信有说明。

发自我的 iPhone

在 2016年12月8日,下午6:01,Kevin notifications@github.com 写道:

微信似乎没有说明有没有适配吧,简单测试了一下登录和分享是可以的。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午5:57:34, 刘靖煌 (notifications@github.com) wrote:

主流平台目前只有新浪微博的网页授权还有点问题——这个是新浪微博开放接口问题。

发自我的 iPhone

在 2016年12月8日,下午5:04,Kevin notifications@github.com 写道:

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <

https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265700274

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/AC_jvapD77HHJOsbIWpOrRmXG_IupBHbks5rF9SNgaJpZM4LHih0

. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265702994 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AC_jvTnFdk4g2EhL0pZM72-us0zPiKJRks5rF9eBgaJpZM4LHih0

. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265707190, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_jvS-q5jLtHaNfMZOWgj5oxrIKTm_kks5rF9wsgaJpZM4LHih0 .

EkkoG commented 7 years ago

看到了,谢谢。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午6:10:11, 刘靖煌 (notifications@github.com) wrote:

微信有说明。

发自我的 iPhone

在 2016年12月8日,下午6:01,Kevin notifications@github.com 写道:

微信似乎没有说明有没有适配吧,简单测试了一下登录和分享是可以的。

-- Kevin Guo Sent with Airmail

On 2016年12月8日 at 下午5:57:34, 刘靖煌 (notifications@github.com) wrote:

主流平台目前只有新浪微博的网页授权还有点问题——这个是新浪微博开放接口问题。

发自我的 iPhone

在 2016年12月8日,下午5:04,Kevin notifications@github.com 写道:

各个平台 SDK 的 ATS 支持情况不一,这个还是需要开发者单独处理的吧

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265700274 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AC_jvapD77HHJOsbIWpOrRmXG_IupBHbks5rF9SNgaJpZM4LHih0

. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MobClub/ShareSDK3.x-for-iOS/issues/25#issuecomment-265702994, or mute the thread https://github.com/notifications/unsubscribe-auth/AC_jvTnFdk4g2EhL0pZM72-us0zPiKJRks5rF9eBgaJpZM4LHih0 .

gaoqiyang commented 7 years ago

Allow Arbitrary Loads 设置为NO(不禁止使用ATS) 。在仅使用QQ和微信的分享时还是出现App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.的错误 使用你们的SDK时才报此问题。 另 “内部的SDK请求会自动根据ATS转换https协议——这个我们一年前适配iOS9时就做了”确定是适配了ATS? 为何Allow Arbitrary Loads 设置为NO 还报错?

JinghuangLiu commented 7 years ago

可以看下blocked的地址是哪个。除了少数平台本身(具体可以看下最新的官方更新说明),其它都测试没问题的。

发自我的 iPhone

在 2016年12月16日,下午4:54,gaoqiyang notifications@github.com 写道:

Allow Arbitrary Loads 设置为NO(不禁止使用ATS) 。在仅使用QQ和微信的分享时还是出现App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.的错误 使用你们的SDK时才报此问题。 另 “内部的SDK请求会自动根据ATS转换https协议——这个我们一年前适配iOS9时就做了”确定是适配了ATS? 为何Allow Arbitrary Loads 设置为NO 还报错?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

gaoqiyang commented 7 years ago

[ShareSDK registerApp:@"xxx" activePlatforms:@[@(SSDKPlatformTypeQQ),@(SSDKPlatformTypeWechat)] onImport:^(SSDKPlatformType platformType) { switch (platformType) { case SSDKPlatformTypeWechat: [ShareSDKConnector connectWeChat:[WXApi class]]; break; case SSDKPlatformTypeQQ: [ShareSDKConnector connectQQ:[QQApiInterface class] tencentOAuthClass:[TencentOAuth class]]; break; default: break; } } onConfiguration:^(SSDKPlatformType platformType, NSMutableDictionary *appInfo) { switch (platformType) { case SSDKPlatformTypeWechat: [appInfo SSDKSetupWeChatByAppId:@"xxx" appSecret:@"xxx"]; break; case SSDKPlatformTypeQQ: [appInfo SSDKSetupQQByAppId:@"xxx" appKey:@"xxx" authType:xxx]; break; default: break; } }]; 下载的SDK版本为3.5.1是你们最新的版本 只要走shareSDK 初始化后 就出现App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.的错误

gaoqiyang commented 7 years ago

补充:NSExceptionDomains内也相应的添加了微信、QQ的域名

JinghuangLiu commented 7 years ago

http://bbs.mob.com/forum.php?mod=viewthread&tid=23340&page=1&extra=%23pid56067