Dial a phone number with an access code programmatically in iOS

前端 未结 10 1130
既然无缘
既然无缘 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条回答
  •  Happy的楠姐
    2020-12-02 07:05

    follow the tutorial

    http://www.makebetterthings.com/blogs/iphone/open-phone-sms-email-map-and-browser-apps-in-iphone-sdk/

    to call a number use -

    NSURL *url = [NSURL URLWithString:@"tel://012-4325-234"];
    [[UIApplication sharedApplication] openURL:url];
    

    to open your app after call finished use -

    (Note: telprompt is undocumented)

    NSURL *url = [NSURL URLWithString:@"telprompt://012-4325-234"];
    [[UIApplication sharedApplication] openURL:url];
    

提交回复
热议问题