I have the below code for sharing my app. This works fine when I run it on my iPhone 6 (iOS 8.1.2) but when I submitted it to apple, they rejected it saying the app crashes when they tap this button on iPad or iPhone 5s (iOS 8.1.2). Any idea what could be causing this?
@IBAction func shareTapped(sender: AnyObject) {
let appAddress = "http://ift.tt/15CNPjv"
var shareText = ""
if team == "" {
shareText = "Tap your cricket team to the top. Download free Cricket Crazy app"
} else {
shareText = "Help take " + team + " cricket team to the top. Download free Cricket Crazy app"
}
let activityViewController : UIActivityViewController = UIActivityViewController(activityItems: [shareText, appAddress], applicationActivities: nil)
self.presentViewController(activityViewController, animated: true, completion: nil)
}
Aucun commentaire:
Enregistrer un commentaire