Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS平台下无法使用 #60

Open
ji0517 opened this issue Nov 9, 2021 · 13 comments
Open

iOS平台下无法使用 #60

ji0517 opened this issue Nov 9, 2021 · 13 comments

Comments

@ji0517
Copy link

ji0517 commented Nov 9, 2021

iOS 15.1
使用的就是这个例子,id什么的替换都正确,能正确跳转到qq,跳转的时候显示如下信息
021-11-09:14:37:20:267 [QQAPI] QQOpenApiUtility.mm:145 on +[QQOpenApiUtility openUniversallinkIfNeed:timUrl:completionHandler:], openUniversallinkIfNeed, url=https://qm.qq.com/opensdkul/mqqOpensdkSSoLogin/SSoLogin/tencent1112056603?objectlocation=url&pasteboard=YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGvEBwLDC0uLzAxMjM0NTY3ODk6Ozw9Pj9DS0xNTk9QVSRudWxs0w0ODxAeLFdOUy5rZXlzWk5TLm9iamVjdHNWJGNsYXNzrRESExQVFhcYGRobHB2AAoADgASABYAGgAeACIAJgAqAC4AMgA2ADq0fICEiIyQlJicoKR8jgA+AEIARgBKAE4AUgBaAF4AYgBmAGoAPgBOAG1ZhcHBfaWRUc2RrcF1yZXNwb25zZV90eXBlWGFwcF9uYW1lXWFwcHNpZ25fdG9rZW5Vc2NvcGVYYnVuZGxlaWRec3RhdHVzX3ZlcnNpb25Uc2Rrdl5zdGF0dXNfbWFjaGluZVlzdGF0dXNfb3NZY2xpZW50X2lkXxAQcmVmVW5pdmVyc2FsbGlua1oxMTEyMDU2NjAzUWlVdG9rZW5fEBN0ZW5jZW50X2tpdF9leGFtcGxlUNIPQEFCWU5TLnN0cmluZ4AVXxATZ2V0X3NpbXBsZV91c2VyaW5mb9JERUZHWiRjbGFzc25hbWVYJGNsYXNzZXNfEA9OU011dGFibGVTdHJpbmejSElKXxAPTlNNdXRhYmxlU3RyaW5nWE5TU3RyaW5nWE5TT2JqZWN0XxASY29tLnh3dGVjLm1hcmtzaG93UjE1WjMuNS4zX2xpdGVaaVBob25lMTIsMVQxNS4x0kRFUVJfEBNOU011dGFibGVEaWN0aW9uYXJ5o1FTSlxOU0RpY3Rpb25hcnkACAARABoAJAApADIANwBJAEwAUQBTAHIAeAB/AIcAkgCZAKcAqQCrAK0ArwCxALMAtQC3ALkAuwC9AL8AwQDPANEA0wDVANcA2QDbAN0A3wDhAOMA5QDnAOkA6wDyAPcBBQEOARwBIgErAToBPwFOAVgBYgF1AYABggGIAZ4BnwGkAa4BsAHGAcsB1gHfAfEB9QIHAhACGQIuAjECPAJHAkwCUQJnAmsAAAAAAAACAQAAAAAAAABUAAAAAAAAAAAAAAAAAAACeA==&sdkv=3.5.1&bundleid=Y29tLnh3dGVjLm1hcmtzaG93&appsign_txid=QQ4248A31B.
2021-11-09:14:37:20:272 [QQAPI] OpenApi.m:793 openQQWithCommand successed
Connection 5: received failure notification
Connection 5: failed to connect 12:8, reason -1
Connection 5: encountered error(12:8)
Task .<0> HTTP load failed, 0/0 bytes (error code: -1003 [12:8])
NSURLConnection finished with error - code -1003

点击qq授权登录后返回:

1-09:14:43:39:412 [QQAPI] OpenApi.m:651 handleOpenURL:url=tencent1112056603://qzapp/mqzone/0?objectlocation=url&pasteboard=YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGvEBwLDCssLS4vMDEyMzQ1Njc4OTo7PkVGR0hJSktMVSRudWxs0w0ODxAdKldOUy5rZXlzWk5TLm9iamVjdHNWJGNsYXNzrBESExQVFhcYGRobHIACgAOABIAFgAaAB4AIgAmACoALgAyADaweHyAhIiMkJSYnKCmADoAPgBCAEYASgBSAFYAWgBeAGIAZgBqAG1pleHBpcmVzX2luXxASYXBwc2lnbl9idW5kbGVudWxsWmVuY3J5dG9rZW5TcmV0XHBhc3NEYXRhUmVzcFZvcGVuaWRScGZedXNlcl9jYW5jZWxsZWRVcGZrZXlZcGF5X3Rva2VuU21zZ1xhY2Nlc3NfdG9rZW4SAHanAFEyXxAgOGQ4ZTg1MTVmNWY0NDY4Y2VhMzNjZGFhZjMyM2NmMGUQANIODzw9oIAT0j9AQUJaJGNsYXNzbmFtZVgkY2xhc3Nlc15OU011dGFibGVBcnJheaNBQ0RXTlNBcnJheVhOU09iamVjdF8QIDA2RjY1REVGMDY2OUY2QzNFMzFBMzQ1MTFBQUZDOEVCXm9wZW5tb2JpbGVfaW9zUk5PXxAgMTRkMzJiMmU5YzZlMWZlZDVhMmY3OWNlMTkyM2QwOGVfECBFRTU1QTdBMEExREIxOUJCRjVCNkU2OTRFQjg0QkJGMVBfECA2M0E2N0I1NkMwNDJENEU4OTc3NzNERkNGRUQ0MUE2MdI/QE1OXxATTlNNdXRhYmxlRGljdGlvbmFyeaNNT0RcTlNEaWN0aW9uYXJ5AAgAEQAaACQAKQAyADcASQBMAFEAUwByAHgAfwCHAJIAmQCmAKgAqgCsAK4AsACyALQAtgC4ALoAvAC+AMsAzQDPANEA0wDVANcA2QDbAN0A3wDhAOMA5QDwAQUBEAEUASEBKAErAToBQAFKAU4BWwFgAWIBhQGHAYwBjQGPAZQBnwGoAbcBuwHDAcwB7wH+AgECJAJHAkgCawJwAoYCigAAAAAAAAIBAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAKX
2021-11-09:14:43:39:412 [QQAPI] OpenApi.m:225 +[OpenApi(PRIVATE) getLargeDataFromParams:],from(url)
2021-11-09:14:43:39:413 [QQAPI] OpenApi.m:283 processMessage(state=1):pasteboard((null)) {
"access_token" = 63A67B56C042D4E897773DFCFED41A61;
"appsign_bundlenull" = 2;
encrytoken = 8d8e8515f5f4468cea33cdaaf323cf0e;
"expires_in" = 7776000;
msg = "";
openid = 06F65DEF0669F6C3E31A34511AAFC8EB;
passDataResp = (
);
"pay_token" = EE55A7A0A1DB19BBF5B6E694EB84BBF1;
pf = "openmobile_ios";
pfkey = 14d32b2e9c6e1fed5a2f79ce1923d08e;
ret = 0;
"user_cancelled" = NO;
}
2021-11-09:14:43:39:418 [QQAPI] OpenApi.m:569 save universallink signature info, sdkmode=2 systemVersion=15.1.
2021-11-09:14:43:41:819 [QQAPI] TencentOAuth.m:1312 login success
2021-11-09:14:43:41:820 [QQAPI] TencentOAuth.m:1325 login success:tencentDidLogin
2021-11-09:14:43:41:892 [QQAPI] TCWebViewLoadJs.m:86 tcwv do load js:shouldStartLoadWithRequest
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x1209f8d80 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=576, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

不知道什么原因,请大神们帮助

@Linspirit98
Copy link

请问有解决吗? 遇到了同样的问题.

@guoguoguilai
Copy link

guoguoguilai commented Mar 17, 2022

我也遇到了这个问题,解决方案如下 #71 (comment)

@cyjaysong
Copy link

@guoguoguilai 不是同一个问题

@cyjaysong
Copy link

该问题依然存在

@droplet-js
Copy link
Collaborator

droplet-js commented Apr 13, 2022

把这个 tencent1112056603 加入到 URL Types

在Xcode中,选择你的工程设置项,选中“TARGETS”一栏,在“info”标签栏的“URL type“添加“URL scheme”为你所注册的应用程序id

URL Types
tencent: identifier=tencent schemes=tencent${appId}

@cyjaysong
Copy link

@v7lin 加了的

@luokunman
Copy link

大佬,你重构开始那版有点问题。给你列举下。
以下为ios 开发环境,android 未测试。

  1. 调用Tencent.instance.isTIMInstalled的方法下如果本身就未安装tim就会报failed for URL: "tim://" - error: "The operation couldn’t be completed. 但是这个方法本身就是检验是否安装。
  2. 调用login方法不成功。未调起qq。控制台也没有反应。

@tomato-m
Copy link

tomato-m commented May 9, 2022

大佬,你重构开始那版有点问题。给你列举下。 以下为ios 开发环境,android 未测试。

  1. 调用Tencent.instance.isTIMInstalled的方法下如果本身就未安装tim就会报failed for URL: "tim://" - error: "The operation couldn’t be completed. 但是这个方法本身就是检验是否安装。
  2. 调用login方法不成功。未调起qq。控制台也没有反应。

我也遇到了,你解决了吗

@luokunman
Copy link

大佬,你重构开始那版有点问题。给你列举下。 以下为ios 开发环境,android 未测试。

  1. 调用Tencent.instance.isTIMInstalled的方法下如果本身就未安装tim就会报failed for URL: "tim://" - error: "The operation couldn’t be completed. 但是这个方法本身就是检验是否安装。
  2. 调用login方法不成功。未调起qq。控制台也没有反应。

我也遇到了,你解决了吗

降低版本。我现在是^2.0.1

@droplet-js
Copy link
Collaborator

已升级 iOS SDK

@owen-juang
Copy link

Tencent.instance.setIsPermissionGranted(granted: true);
Tencent.instance.registerApp(appId: '你的id');

注意调用顺序,我整了一天才找到解决办法, 不知道是作者没用心还是故意挖坑

@owen-juang
Copy link

大佬,你重构开始那版有点问题。给你列举下。 以下为ios 开发环境,android 未测试。

  1. 调用Tencent.instance.isTIMInstalled的方法下如果本身就未安装tim就会报failed for URL: "tim://" - error: "The operation couldn’t be completed. 但是这个方法本身就是检验是否安装。
  2. 调用login方法不成功。未调起qq。控制台也没有反应。

我也遇到了,你解决了吗

Tencent.instance.setIsPermissionGranted(granted: true);
Tencent.instance.registerApp(appId: '你的id');

注意调用顺序,我整了一天才找到解决办法, 不知道是作者没用心还是故意挖坑

@droplet-js
Copy link
Collaborator

droplet-js commented Jul 5, 2022

嗯,有空,其实可以先看一下 example,另外再关注一下函数的顺序。一般是顺序执行的。

不看 README.md 和 example 的人一堆 ... 谁都救不了 ...

example/lib/main.dart

          ListTile(
            title: Text('3.1.0 之后的版本请先获取权限'),
            onTap: () async {
              await Tencent.instance.setIsPermissionGranted(granted: true);
              _showTips('授权', '已授权获取设备信息/同意隐私协议');
            },
          ),

Android_SDK环境搭建

2. 初始化SDK
3.5.7版本新增接口提供用户设置是否已授权获取设备信息,在调用互联SDK相关功能接口之前,需要应用在确认用户已授权应用获取设备信息后,调用下面代码通知 SDK:

Tencent.setIsPermissionGranted(true);

如果未调用该接口或传参为false时,调用其它功能接口将直接返回失败。

3.5.9版本中可以调用Tencent.setisPermissionGranted(true, Build.Model)传入Build.Model,传入后SDK内部不再自行获取。

iOS_SDK环境搭建

4.5设置用户是否同意隐私协议。
3.5.7版本更新后,在初始化SDK之前必须设置用户同意授权隐私协议,如果没有设置或者设置为NO(不同意)则无法使用SDK的接口,设置方式如下:

[TencentOAuth setIsUserAgreedAuthorization:YES];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants