Canopenurl - This App Is Not Allowed to Query for Scheme Instragram

canOpenUrl - This app is not allowed to query for scheme instragram

  1. Your LSApplicationQueriesSchemes entry should only have schemes. There's no point to the second entry.

    <key>LSApplicationQueriesSchemes</key>
    <array>
    <string>instagram</string>
    </array>
  2. Read the error. You are trying to open the URL with a typo in the scheme. Fix your reference to instragram in your call to canOpenURL:.

canOpenURL: failed for URL: instagram://app - error: This app is not allowed to query for scheme instagram

Right click on your plist file and open it as source code. Then copy and paste below code:

<key>LSApplicationQueriesSchemes</key>
<array>
<string>instagram</string>
</array>

Note: One thing you have to keep in mind that it will not work on simulator. You need a real device for this.

failed for URL: message:// - error: This app is not allowed to query for scheme message

This does not work in the simulator, only on a real device.

Don't forget to configure your Info.plist and add entry to message under this key: LSApplicationQueriesSchemes, so you can query it with canOpenURL.

Example Info.plist file that whitelists the URl query schemes :

<key>LSApplicationQueriesSchemes</key>
<array>
<string>googlegmail</string>
<string>mailto</string>
<string>instagram</string>
<string>message</string>
</array>

Info.plist

You can also consider to use the mailto schema

let mailURL = URL(string: "mailto://example@example.com")

Custom URL Scheme Error : This app is not allowed to query for scheme

You are doing it in opposite way if you register:

<key>LSApplicationQueriesSchemes</key>
<array>
<string>com.test.clientEndApp</string>
</array>

You should be calling this scheme

let urlsrting = "com.test.clientEndApp://provideInfo?username='Debanjan'"

An you were missing com.test. from your LSApplicationQueriesSchemes

This app is not allowed to query for scheme error (have listed correct info.plist info)

LSApplicationQueriesSchemes is an array.

<key>LSApplicationQueriesSchemes</key>
<array>
<string>scheme1</string>
<string>scheme2</string>
</array>

failed for URL: snapchat:// - error: This app is not allowed to query for scheme snapchat

You need to add the schemes you try to open in your app in the info.plist file. Add these lines in your info.plist right after the first <dict> keyword you see when you open it as source code.

    <key>LSApplicationQueriesSchemes</key>
<array>
<string>snapchat</string>
</array>


Related Topics



Leave a reply



Submit