UIActivityViewController not displaying third party apps
UIActivityViewController not displaying third party apps
- Subject: UIActivityViewController not displaying third party apps
- From: Devarshi Kulshreshtha <email@hidden>
- Date: Sun, 06 Oct 2013 18:08:51 -0500
I am trying to use UIActivityViewController as open-in option in my app.
I am using below code:
- (void)displayThroughOpenIn
{
NSString *localFilePathString = [self
generateLocalPathForFile:self.mCurrentFile];
NSURL *localFilePath = [NSURL fileURLWithPath:localFilePathString];
NSArray *activityItems = @[localFilePath];
//-- initialising the activity view controller
UIActivityViewController *avc = [[UIActivityViewController alloc]
initWithActivityItems:activityItems
applicationActivities:nil];
//-- define the activity view completion handler
avc.completionHandler = ^(NSString *activityType, BOOL completed)
{
if (completed) {
}
else
{
// cancel button clicked
// poup the view controller from navigation view stack
[self popToBackViewController];
}
};
//-- define activity to be excluded (if any)
avc.excludedActivityTypes = [NSArray
arrayWithObjects:UIActivityTypeAssignToContact, nil];
//-- show the activity view controller
[self presentViewController:avc
animated:YES completion:nil];
}
Problem is - It is not displaying any of the third party apps, such as
adobe reader, chrome.
I think this is because I am passing applicationActivities as nil in –
initWithActivityItems:applicationActivities: .
If this is the case then do I need to subclass UIActivity for each of the
third party apps and it will not support those apps by default?
Please clarify.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden