An app I'm working with uses SLComposeViewController to send Tweets. This functionality has been working in the app for a while. I am running into problems after updating the SDK to 7.0.
The problem is the SLComposeViewController calls its completion handler immediately after presenting. The SLComposeViewControllerResult is Cancel. This happens with any attempt to show the SLComposeViewController.
I was able to get this code working on 64 bit devices/simulator in a sample application, but it fails with the larger application I am working on.
Working cases:
- Any device with 6.1 SDK
- Any 32 bit device with 7.0 SDK
- My sample application
Failing cases:
- 64 bit iPhone 5S and 64 bit simulator
Here is simple implementation of failing code (pretty much what you can see in any example).
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
SLComposeViewController *vc = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[vc setInitialText:@"Hi Twitter"];
vc.completionHandler = ^(SLComposeViewControllerResult result)
{
};
[self presentViewController:vc animated:YES completion:nil];
return;
}
The following article indicates other apps are having trouble sharing via Twitter http://tellmenews.com/ipad-air-suffers-from-same-ios-7-twitter-sharing-problem-as-iphone-5s/179686/samantha-ross. For the record, Twitter sharing from the iOS Photo apps works on my device.
Any ideas of what the differences could be between my working sample app and the failing app?