Simple line of code:
NSLog(@"Checking on Facebook: %d -- Checking on Twitter: %d",[SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook], [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]);
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?
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?
It seems isAvailableForServiceType
always returns 1
in Simulator.
Maybe you can test it in ipad with IOS6.
From my experience, I can confirm this is a bug in iOS Simulator 6.0. The isAvailableForServiceType
method always returns TRUE for any service type on iOS Simulator.
On actual device running current iOS 6.0 it is working as expected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With