SLComposeViewController: Different behavior of “No Twitter Accounts” alert depending on whether or not Twitter app is installed

Originator:florian.alexander.schulz
Number:rdar://25214135 Date Originated:17-Mar-2016 11:11 AM
Status:Open Resolved:
Product:iOS SDK Product Version:9.2.1
Classification:UI/Usability Reproducible:Always
 
Summary:
If the Twitter app is installed, but no accounts are configured and you try to tweet something using SLComposeViewController, the alert saying “No Twitter Account” doesn’t offer an action button “Settings”. If you press “OK”, the tweet compose view stays open, but you can’t tweet as there are no accounts, of course.

Steps to Reproduce:
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 an alert “No Twitter Accounts” with the actions “Cancel” and “Settings”.
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 an alert “No Twitter Account” (singular) with the only action “OK”.
f 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.

Expected Results:
No matter whether or not Twitter is installed, the alert should always show a “Settings” button. If canceled, the compose view should be closed automatically, as it can’t be used anyways.

Actual Results:
See above.

Regression:
Tested on iOS 9.2.1, iPad Air (2nd gen) & iPhone 6 Plus. 

Notes:
See the related question on StackOverflow:
https://stackoverflow.com/questions/36007768/slcomposeviewcontroller-different-behavior-of-no-twitter-accounts-alert-depen

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!