Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This app is not allowed to query for scheme tel

I just opened an old project onbjectif-c created in 2010, the application works correctly except an interface is not working.The error is -canOpenURL: failed for URL: "tel: 0" - error: "This app is not allowed to query for scheme tel".

according to my research I find that the error is related to ios 9 but I do not find how to resolve it thank you

like image 497
user3851069 Avatar asked Feb 01 '18 09:02

user3851069


3 Answers

I've got the same mistake! The thing is that using phone calls with URL schemes doesn't require a special key in Info.plist. The answer is- in simulator, this will not work, you need to test in device. The simulator doesn't have carrier service.

like image 124
Vitya Shurapov Avatar answered Nov 04 '22 00:11

Vitya Shurapov


This means you have to add the scheme 'tel' in your info.plist, i.e

    <key>LSApplicationQueriesSchemes</key>
            <array>
                    <string>tel</string>
            </array>

This will whitelist the scheme 'tel'

like image 40
Lehlohonolo_Isaac Avatar answered Nov 04 '22 00:11

Lehlohonolo_Isaac


for me this error was shown on the simulator, in testing on a real device it wasn't shown

like image 31
Enakhi Avatar answered Nov 04 '22 01:11

Enakhi