isAvailableForServiceType总是返回true? [英] isAvailableForServiceType always returns true?

查看:400
本文介绍了isAvailableForServiceType总是返回true?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单的代码行:

NSLog(@"Checking on Facebook: %d -- Checking on Twitter: %d",[SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook], [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]);

问题是我两个BOOL都得到1。这是一个问题,因为Twitter和Facebook都没有设置帐户。这是在模拟器上,所以想知道人们是否经历过这种情况也会在设备上发生?

Problem is that I'm getting 1 for both BOOLs. That's a problem because neither Twitter nor Facebook is setup with an account. This is on the simulator, so wondering if people have experienced this is happening on devices as well?

文档说它应该只在服务可用时才返回true至少设置一个帐户。但即使没有帐户设置,我也会成真。我想使用这些值来隐藏一些社交帖子按钮,所以希望这样做。

Documentation says that it should only return true if the service is available and at least one account is setup. But I'm getting true even without accounts setup. I'd like to use the values to hide some social posting buttons so would like this to work.

推荐答案

你运行了吗?在模拟器中?

Did you run the that in Simulator?

似乎 isAvailableForServiceType 总是返回 1 在模拟器中。

It seems isAvailableForServiceType always returns 1 in Simulator.

也许你可以用iOS6在ipad上测试它。

Maybe you can test it in ipad with IOS6.

这篇关于isAvailableForServiceType总是返回true?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆