2

I am using UIACtivityViewController to to create sharing feature in my app. The problem i am facing is that, the i want to get the real application name which user has used to share the things in my app.

There are some default social services which are mentioned in https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivity_Class/#//apple_ref/doc/constant_group/Built_in_Activity_Types

But there are also some other services like Slack, Skype, Linkedin which are not there in the built in services. How can i get the name of these app when user has used these services to share an item from my application. I can map Built in activity types to their corresponding names but how i can get the name of other apps which are not built in because in the completeionHandler of the sharing service it only gives us the activityType not the human readable String for Activity Title.

UIActivityViewController * shareViewController = [[UIActivityViewController alloc] initWithActivityItems:@[activity] applicationActivities:nil];

  shareViewController.completionWithItemsHandler = ^(NSString *activityType, BOOL completed, NSArray *returnedItems, NSError *activityError){

    NSLog(@"Completed : %d", completed);
    NSLog(@"Activity Type : %@", activityType);

  };

Any help will be great thanks

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.