This app is not allowed to query for scheme fb in iOS

iOS Development

I wanted to open a Facebook Group page in the Facebook app on my iPhone but I was getting that error since I did not have any LSApplicationQueriesSchemes in my Info.plist file.

This is the code

let fbPage = "fb://profile/" + FB_GROUP_ID // Your Facebook group id e.g 8794808798015
let fbURL = URL(string:fbPage)
let canOpenURL = UIApplication.shared.canOpenURL(fbURL!)
if (canOpenURL) {
    UIApplication.shared.open(fbURL!, completionHandler: nil)
}

After adding ‘fb’ in my scheme it solves the issue.

My Info.plist file

This app is not allowed to query for scheme
Spread the love

Comments

One response to “This app is not allowed to query for scheme fb in iOS”

  1. elizabeth958 Avatar
    elizabeth958

    I was missing the LSApplicationQueriesSchemes.

Leave a Reply