Replacing tel or telprompt to call

前端 未结 3 1712
情书的邮戳
情书的邮戳 2021-01-16 03:39

I\'ve made an application is used to call predefined numbers upon button press. As far as i know the only way to make call inside app is to use \"tel\" or \"telprompt\". Whe

相关标签:
3条回答
  • 2021-01-16 04:02

    Use following code:

    NSString *phoneNumber = @"+91 2308966";
    NSString *phoneURLString = [NSString stringWithFormat:@"tel:%@", phoneNumber];
    NSURL *phoneURL = [NSURL URLWithString:phoneURLString];
    [[UIApplication sharedApplication] openURL:phoneURL];
    

    This code is working for an app which I submitted to the Appstore.

    0 讨论(0)
  • 2021-01-16 04:08

    You have used telEprompt:// instead of telprompt://

    0 讨论(0)
  • 2021-01-16 04:17

    From your update, it suggests you're sending tel://... or teleprompt://... as a URL. The tel: scheme takes a series of digits. / is not a digit, so there's no reason you should be passing that as part of the number.

    0 讨论(0)
提交回复
热议问题