Example project: http://cl.ly/261z1P100T25
Under iOS 7, when I try to add a URL to a tweet, the method should return NO if there's no enough space to add it ("This method returns NO if url does not fit in the currently available character space") but this method ALWAYS returns YES in iOS 7. For example, in the following example, "Couldn't add." is never printed and the tweet is presented with -32 characters remaining.
SLComposeViewController *twitterViewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
NSString *titleToShare = @"i am a string a super string the most super string that ever existed in the world of the super string universe which as it happens is very super as well";
if (titleToShare.length > 140) {
titleToShare = [titleToShare substringToIndex:140];
}
[twitterViewController setInitialText:titleToShare];
if (![twitterViewController addURL:[NSURL URLWithString:@"http://google.com"]]) {
NSLog(@"Couldn't add.");
}
[self presentViewController:twitterViewController animated:YES completion:nil];
Is it broken? Do I have to code around this?