1、之前已经使用QQ、微信的原生SDK做了登录功能,添加ShareSDK后,微信登录在授权后不调用onResp函数了
解决办法就是把之前的原生微信登录跟QQ登录去掉了,换成ShareSDK,ShareSDK做第三方登录太简单了,一个函数调用加一个回调就全部搞定了。
2、菜单分享时不弹出QQ平台相关的两个项:QQ与QQ空间
同时发现控制台输出如下错误:
2016-05-26 09:23:20.501 cloth[4197:1398408] -canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "This app is not allowed to query for scheme wtloginmqq2"
2016-05-26 09:23:20.504 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqopensdkapiV3://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV3"
2016-05-26 09:23:20.506 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqwpa://qzapp" - error: "This app is not allowed to query for scheme mqqwpa"
2016-05-26 09:23:20.509 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV2"
2016-05-26 09:23:20.512 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqOpensdkSSoLogin://qqapp" - error: "This app is not allowed to query for scheme mqqOpensdkSSoLogin"
2016-05-26 09:23:20.515 cloth[4197:1398408] -canOpenURL: failed for URL: "mqq://qqapp" - error: "This app is not allowed to query for scheme mqq"
2016-05-26 09:23:20.518 cloth[4197:1398408] -canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "This app is not allowed to query for scheme wtloginmqq2"
2016-05-26 09:23:20.521 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqopensdkapiV3://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV3"
2016-05-26 09:23:20.524 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqwpa://qzapp" - error: "This app is not allowed to query for scheme mqqwpa"
2016-05-26 09:23:20.527 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV2"
2016-05-26 09:23:20.529 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqOpensdkSSoLogin://qqapp" - error: "This app is not allowed to query for scheme mqqOpensdkSSoLogin"
2016-05-26 09:23:20.531 cloth[4197:1398408] -canOpenURL: failed for URL: "mqq://qqapp" - error: "This app is not allowed to query for scheme mqq"
2016-05-26 09:23:20.504 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqopensdkapiV3://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV3"
2016-05-26 09:23:20.506 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqwpa://qzapp" - error: "This app is not allowed to query for scheme mqqwpa"
2016-05-26 09:23:20.509 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV2"
2016-05-26 09:23:20.512 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqOpensdkSSoLogin://qqapp" - error: "This app is not allowed to query for scheme mqqOpensdkSSoLogin"
2016-05-26 09:23:20.515 cloth[4197:1398408] -canOpenURL: failed for URL: "mqq://qqapp" - error: "This app is not allowed to query for scheme mqq"
2016-05-26 09:23:20.518 cloth[4197:1398408] -canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "This app is not allowed to query for scheme wtloginmqq2"
2016-05-26 09:23:20.521 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqopensdkapiV3://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV3"
2016-05-26 09:23:20.524 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqwpa://qzapp" - error: "This app is not allowed to query for scheme mqqwpa"
2016-05-26 09:23:20.527 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV2"
2016-05-26 09:23:20.529 cloth[4197:1398408] -canOpenURL: failed for URL: "mqqOpensdkSSoLogin://qqapp" - error: "This app is not allowed to query for scheme mqqOpensdkSSoLogin"
2016-05-26 09:23:20.531 cloth[4197:1398408] -canOpenURL: failed for URL: "mqq://qqapp" - error: "This app is not allowed to query for scheme mqq"
网上查找,都说需要将报错的项加到info.plist的LSApplicationQueriesSchemes中,可是我已经从Demo中将所有项都拷贝过来了,还是报错
最后发现拷贝过来的LSApplicationQueriesSchemes后面带了个-2,原来之前在info.plist中已经存在LSApplicationQueriesSchemes项,里面有微信相关的,却没有QQ相关的,所以QQ平台相关的没出来,解决办法就不用说了。
3、上面配置好后,继续调试,QQ分享出现错误,说QQ41E250D8没加到URL Schemes中
加进去就好了……