How do I fix the following error:
Expression implicitly coerced from 'String?' to Any
The error is given in the code snippet below:
let frase = lblFrase.text
let textToShare = [ frase ]
///O erro esta nesta linha
let activityViewController = UIActivityViewController(activityItems: textToShare, applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = self.view
activityViewController.excludedActivityTypes = [ UIActivityType.airDrop, UIActivityType.mail ]
self.present(activityViewController, animated: true, completion: nil)