I make one app. App generate “ .vcf ” and you want to send that vcf to everyone. My option is send it through email , whatsapp ,and other share apps, and i use UIActivityViewController, but it can’t send whatsapp. I can send image ,video , audio but i can’t send contact. Please help me to solve this problem. I refere this link and do that thing same as mention but same problem occurred.
Thanks in advance.
Here is my code.
Here you check i send every thing image ,audio, video but not able to send contact. So help me.
-(void)shareContact
{
//NSString *str = [[NSBundle mainBundle] pathForResource:@"HAK" ofType:@".mp3"];
//NSString *str = [[NSBundle mainBundle] pathForResource:@"b" ofType:@"png"];
//NSString *str = [[NSBundle mainBundle] pathForResource:@"Movie" ofType:@".mp4"];
NSString *str = [[NSBundle mainBundle] pathForResource:@"vCard" ofType:@".vcf"];
//NSString *str = [self vCardRepresentation];
NSURL *fileUrl = [NSURL fileURLWithPath:str];
NSArray *objectsToShare = @[fileUrl];
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
[self presentViewController:controller animated:YES completion:nil];
}