Dial a phone number with an access code programmatically in iOS

前端 未结 10 1131
既然无缘
既然无缘 2020-12-02 06:54

How can I dial a phone number that includes a number and access code programmatically in iOS?

For example:

number: 900-3440-567
Access C

10条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-02 06:55

    Using this user can redirect on Call and after the call he/she will automatically redirected to the app. It's working for me and sure about it.

    if ([[device model] isEqualToString:@"iPhone"] ) {
    
        NSString *phoneNumber = [@"telprompt://" stringByAppendingString:cellNameStr];
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];
    
    } else {
    
        UIAlertView *warning =[[UIAlertView alloc] initWithTitle:@"Alert" message:@"Your device doesn't support this feature." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
    
        [warning show];
    }
    

提交回复
热议问题