Language Used: Swift 2.3
Viber's url scheme for sending a message is viber://forward?text=
Whatsapp's url scheme for sending a message is whatsapp://send?text=
The problem is NSURL seems to think that url's that don't have .
on them are not urls because this code seems to result to nil
let someString = "This is some kind of long string"
print(NSURL(string: "viber://forward?text=\(someString)"))
print(NSURL(string: "viber://whatsapp://send=\(someString)"))
This results to a log which looks like this.
nil
nil
Which means I can't use UIApplication.sharedApplication().openUrl(someUrl)