Tel URIs containing * and # are not working on iOS 15 and onwards. When I try to execute the following statement
[UIApplication.sharedApplication openURL:[NSURL URLWithString:@"tel://*21*12345#"] options:@{} completionHandler:nil];
It didn't show anything on the device.
NSString *numberToDial = @"*21*12345#";
NSString *encodedNumberToDial = [numberToDial stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", encodedNumberToDial]];
I also try to encode it but it didn't work.
According to the docs: https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html
It appears that this is a limitation of the API and by design because of security.