Eduardo Coelho
Eduardo Coelho

Reputation: 1963

Facebook App Invites opens SafariViewController instead of Native app

I'm trying to implement the App Invites feature from Facebook and I'd like to have my users redirected to the Native Facebook app (if installed on the user's device).

However, event though the Facebook Native app is installed on the device it is never opened, the 'Invite Dialog' is always opened in a SafariViewController instead (see attached image below). This is undesired because most of the time the user isn't logged in the Safari and would give up completing the "invite" task.

Here are SDK versions I'm using to build the app:

I've read the Preparing Your Apps for iOS9 and already populated my Info.plist with all possible URL schemes:

<key>LSApplicationQueriesSchemes</key> <array> <string></string> <string>http</string> <string>https</string> <string>mailto</string> <string>fb</string> <string>fbapi</string> <string>fb-messenger-api</string> <string>fbauth2</string> <string>fbshareextension</string> <string>fbapi20130214</string> <string>fbapi20130410</string> <string>fbapi20130702</string> <string>fbapi20131010</string> <string>fbapi20131219</string> <string>fbapi20140410</string> <string>fbapi20140116</string> <string>fbapi20150313</string> <string>fbapi20150629</string> <string>fbauth</string> <string>fb-messenger-api20140430</string> <string>fb-messenger-platform-20150128</string> <string>fb-messenger-platform-20150218</string> <string>fb-messenger-platform-20150305</string> </array>

Nonetheless, the SafariViewController is always opened instead the Facebook Native App.

How can I have my app users to use the 'App Invite' dialog using the Native Facebook app?

App Invite in SafariViewController

Upvotes: 2

Views: 1666

Answers (1)

Francisco Medina
Francisco Medina

Reputation: 363

It seems like this was designed by Facebook, apparently Facebook choses to use SafariViewController to avoid asking for permission to switch app several times. You can check the FAQ here

FAQ

Why do I see a ' wants to open Facebook' alert dialog when invoking a dialog?

In iOS 9, the app switches can prompt the user with a confirmation dialog. The SDK will try to minimize the frequency of this by choosing the best dialog available (such as SafariViewController), but this is by design in iOS 9.

Upvotes: 6

Related Questions