Call to a number, which contain #. (IPhone SDK)

前端 未结 4 1463
后悔当初
后悔当初 2020-12-06 14:25

I need to make call to a number, that start with #. For example phone number in Russia looks like +79123817711 and I need to call #79123817711. I\'m trying this:

<         


        
4条回答
  •  生来不讨喜
    2020-12-06 15:02

    I tried iOS 10. But it was not working. But from iOS 12 now its working. do not know how.

    NSString *mobileNocleanedString = @"*454*200#";
    
    NSURL *phoneUrl = [NSURL URLWithString:[NSString  stringWithFormat:@"tel:%@",mobileNocleanedString]];
    
    if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
        [[UIApplication sharedApplication] openURL:phoneUrl];
    }
    

提交回复
热议问题