I use the following code for Twitter sharing in my app:
SLComposeViewController *twitter = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[twitter setInitialText:@"some text"];
twitter.completionHandler = ^(SLComposeViewControllerResult result)
{
// do something...
[topViewController dismissViewControllerAnimated:YES completion:nil];
};
[topViewController presentViewController:twitter animated:YES completion:nil];
Now, if there are no Twitter accounts set up and if the Twitter app is not installed, I get the following alert:
It does exactly what it should, pressing "Cancel" closes both the alert view and the Twitter compose view. Pressing "Settings" also closes both views and opens the settings. Nice.
Now, if there are no Twitter accounts set up, but the Twitter app is installed, I get the following alert:
Note that there is no "Cancel" and no "Settings" button, just an "OK" button. If pressed, the alert view disappears, but the Twitter compose view stays there with the "Post" button grayed out. So the user is left to press "Cancel" again to close the compose view and to go to the settings herself. Not so nice.
Please note that it doesn't make a difference whether or not I check for service availability before presenting the SLComposeViewController:
[SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter];
Do you know, why there is this difference in behavior and if there is a way to get the same behavior, no matter whether or not the Twitter app is installed?
Tested on iOS 9.2.1, iPad Air (2nd gen) & iPhone 6 Plus.