I have an issue with sharing in my app, and am wondering if I am doing something wrong, or if this is possibly a bug in iOS8.
In my app I have the ability to share files, if the sharing type supports attachments it attaches the file (such as email), otherwise it shares a String containing a link to the file.
In creating the share activity I do something like this (I've greatly simplified my own implementation, but this is an example):
-(void)showShareButtons:(BOOL)animated
{
NSString *textToShare = @"Foobar!";
NSURL *myWebsite = [NSURL URLWithString:@"http://www.stackoverflow.com/"];
NSString *localPath = [NSTemporaryDirectory() stringByAppendingPathComponent:"temp.foo"];
NSURL *localFile = [NSURL fileURLWithPath:localPath];
NSArray *objectsToShare = @[textToShare, myWebsite, localFile];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
NSArray *excludeActivities = nil;
activityVC.excludedActivityTypes = excludeActivities;
[m_viewController presentViewController:activityVC animated:YES completion:nil];
}
On iOS7 I receive the options "Message, Mail, Twitter, and Facebook" for sharing, which is what I expect.
-For the Mail and Message it uses the String, the URL and the local file
-For Twitter and Facebook its only the String and the URL, where the URL is presented as a proper link (not shown in message)
On iOS8 I only receive the options Message and Mail, both are the same as they are in iOS7.
It seems that it is now limiting it to sharing options which support every item, whereas before it would list items which supported any.
Build info:
Both are being built in xCode6 Beta, and the deployment target is currently set to iOS7.0
iOS 8.0(12A4345d) on an iPhone 5(MD295C/A), 7.1.2 (11D257) on 4S (MD241C/A)
edit: Also, if I set only one option, such as a string, all options are available. So I am able to share to these on both (i.e., they are enabled)