Skip to content

Instantly share code, notes, and snippets.

@elnaqah
Created February 7, 2014 22:03
Show Gist options
  • Save elnaqah/8872912 to your computer and use it in GitHub Desktop.
Save elnaqah/8872912 to your computer and use it in GitHub Desktop.
share arabic text on whatsapp from your ios application
NSString * titleWithoutSpaces=[self.item.title stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *whatsappURL = [NSURL URLWithString:[NSString stringWithFormat:@"whatsapp://send?text=%@-%@",titleWithoutSpaces,link]];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
[[UIApplication sharedApplication] openURL: whatsappURL];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment