I am trying to launch Health app from my application.
I usually try with the following lines of code for launching application like as
let mystr = "health://"
let myurl = NSURL(string: mystr)!
if (UIApplication.sharedApplication().canOpenURL(myurl))
{
UIApplication.sharedApplication().openURL(myurl)
}
else
{
print("unable to open")
}
I tried above code.i am getting error ("null").
Some one please help in this issue.
Thanks in advance.