How do I make a private phone call?

82 views Asked by At

This is my sample code I did to hide my number.

- (void)openScheme:(NSString *)scheme {
    NSLog(@"%@",scheme);
    scheme = @"telprompt://*67+91-**********";
    UIApplication *application = [UIApplication sharedApplication];
    NSURL *URL = [NSURL URLWithString:scheme];
    //URL = [URL URLByAppendingPathComponent:@"*"];
    if ([application respondsToSelector:@selector(openURL:options:completionHandler:)]) {
        [application openURL:URL options:@{}
           completionHandler:^(BOOL success) {
               NSLog(@"call made");
           }];
    } else {
        BOOL success = [application openURL:URL];
        NSLog(@"Open scheme failed");
    }
}  

It is not working on IOS 10 iPhone 5c. Is there any change I need to do in the settings?

The call popup doesn't appear when I add *67. It works when I remove it.

0

There are 0 answers