@IBAction func openLinkedin() {
let url = NSURL(string: self.currentUser.linkedin)!
if(UIApplication.sharedApplication().canOpenURL(url) == true){
if currentUser.linkedin.rangeOfString("linkedin") != nil{
UIApplication.sharedApplication().openURL(url)
}else{
Utility.sharedInstance.showAlert("\(currentUser.display_name) heeft geen correcte linkedin link.")
}
}else{
Utility.sharedInstance.showAlert("\(currentUser.display_name) heeft geen linkedin link ingevuld.")
}
}
i have this pice of code in my project. When i test it it works flawlessly. But for some reason it works on my phone and not on my test device. Can anyone explain what is happening?
Self.currentUser.linkedin = https://nl.linkedin.com/in/username
when i tap the button on the phone where it is not working i dont get any errors from canOpenUrl()
is this a bug?
Thanks for any awnser!
Cees