Questions tagged [uiactivityviewcontroller]

The UIActivityViewController class is a standard view controller that you can use to offer various services from your application (on iOS).

The UIActivityViewController class is a standard view controller that you can use to offer various services from your application. The system provides several standard services, such as copying items to the pasteboard, posting content to social media sites, sending items via email or SMS, and more. Apps can also define custom services.

Resources:

1252 questions
7
votes
2 answers

Share multiple images with UIActivityViewController

I am trying to share multiple images with UIActivityViewController, but so far, the examples I have found only share 1 image at a time. Any suggestions?
7
votes
4 answers

UIActivityViewController - how to change the cancel button text

Does anybody know how to change the standard cancel button text value of UIActivityViewController? By default it's "Cancel". But I want to change it e.g. to be in different language. How to do it? Thanks!
Sid
  • 85
  • 1
  • 5
7
votes
2 answers

Can I use UIActivityViewController to share on Facebook ?

I am trying to use UIActivityViewController to share on facebook. When I am using the UIImage* image = [UIImage imageNamed:@"image1.png"]; NSArray* dataToShare = @[@"test",image]; UIActivityViewController* activityViewController…
Ulile
  • 251
  • 1
  • 3
  • 9
7
votes
1 answer

iOS - Only first line of text is viewable

In two places in our app the text that the user types in only shows first line of text. Both occurances are in external frameworks, first in UIActivityView, the other in Freshdesk MobiHelp. First, with UIActivityView, when using Twitter: The problem…
Hans N. Hjort
  • 851
  • 7
  • 19
7
votes
1 answer

UIActivityViewController crashing, NSCFConstantString _beforeActivity unrecognized selector sent to instance

I'm trying to add the new iOS 6 sharing functionality to my app using the UIActivityViewController. I've got some text that I want to share and if they choose Email I want to automatically set the Subject of the email as well. NSArray…
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229
6
votes
0 answers

Swift 5 thumbnailImageForActivityType method not called

This is my code and only thumbnailImageForActivityType is not called... class ShareMovieEvent: NSObject, UIActivityItemSource { let movieDate: String let movieTitle: String let movieDescription: String let imageHeader:…
Fabio
  • 1,913
  • 5
  • 29
  • 53
6
votes
3 answers

Posting to correct Instagram Account with UIActivityViewController

I am using UIActivityViewController to post images to Instagram app from MY app. Please note my app does not use Instagram API or log in to users' Instagram Account. let sharingImage = button.backgroundImage(for: []) let avc =…
Kashif
  • 4,642
  • 7
  • 44
  • 97
6
votes
2 answers

share pdf file using UIActivityViewController in Swift 4

I am using UIActivityViewController to share a PDF file: let pdfFilePath = URL(string: "https://www.tutorialspoint.com/swift/swift_tutorial.pdf") let pdfData = NSData(contentsOf: pdfFilePath!) let activityVC = UIActivityViewController(activityItems:…
Fatima
  • 464
  • 1
  • 8
  • 19
6
votes
1 answer

Gif shared through UIActivityViewController comes out as static image in (at least) fb, twitter, notes

I'm trying to share a gif from my (unity) app, through the standard iOS sharing screen, to a social network. Because of this question I first wrap the path to the gif in an NSURL before sending it to the UIActivityViewController: NSURL *nsGifURL =…
tenpn
  • 4,556
  • 5
  • 43
  • 63
6
votes
1 answer

Prompt use to save to iCloud WITHOUT using UIActivityViewController

If I use the following code NSArray * activityItems = @[tempFileURL]; UIActivityViewController * activityViewController = [[UIActivityViewController alloc] initWithActivityItems: activityItems …
Kyle
  • 17,317
  • 32
  • 140
  • 246
6
votes
1 answer

How can I share location from my app to WhatsApp in Swift 3

I'm trying to share a location from my iOS app to WhatsApp and I want it to look like this: What I'm doing is sending vCard with this code : func vCardURL(from coordinate: CLLocationCoordinate2D, with name: String?) -> URL { let vCardFileURL =…
coctile
  • 83
  • 2
  • 5
6
votes
0 answers

UIActivityViewController showing "Unable to Load" row in iOS 11

I was using a UIActivityViewController instance in several previous versions of an app in order to share content through AirDrop, and other services. And now, without even recompiling, when running the app in iOS 11 Beta, the dialog…
nbloqs
  • 3,152
  • 1
  • 28
  • 49
6
votes
0 answers

UIActivityViewController - Remove all Activities starting with com.apple.UIKit.activity.Open.Copy rawValue

I'm trying to remove all activity types start with com.apple.UIKit.activity.Open.Copy from UIActivityViewController. I tried following but didn't get success, anybody does this? func showShareActivity(videoURL : NSURL, onComplete:@escaping (Bool,…
Mohammad Zaid Pathan
  • 16,304
  • 7
  • 99
  • 130
6
votes
4 answers

iOS: crash if sharing with "Message" option

Our app only supports portrait mode. Presenting a UIActivityViewController works. However, sharing with the "Message" option crashes the app: *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason:…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
6
votes
1 answer

UIActivityViewController setCompletionWithItemsHandler not called for whatsapp activity

UIActivityViewController setCompletionWithItemsHandler not called for whatsapp activity. Has anyone faced the same issue? Please share solution if any. NSArray *applicationActivities = @[[[JBWhatsAppActivity alloc] init]]; UIActivityViewController*…
Bablu Joshi
  • 379
  • 1
  • 5
  • 19