• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIActivityViewController not displaying third party apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Predicate syntax and localisation
  • Next by Date: Re: High-quality offscreen rendering of text?
  • Previous by thread: Re: Predicate syntax and localisation
  • Next by thread: UITableViewCell.accessoryType UITableViewCellAccessoryDetailDisclosureButton on iOS7
  • Index(es):
    • Date
    • Thread