Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple rejected app 10.6 because Facebook opens Safari to login

I sent another version of my app, that allow users to login via Facebook. Of course, I use official Facebook iOS SDK.

But Apple twice rejected my app with following reason:

The app opens a web page in mobile Safari for logging in, then returns the user to the app. The user should be able log in without opening Safari first.

I tried to get more info, and reviewer's answer was:

Thank you for your response. We reviewed your app version 3.2.1 and when the user taps Facebook to login, the user is taken to mobile Safari and then back to the app.

It provides poor user's experience and not in compliance with the Guidelines.

and

Thank you for your response. It would be appropriate to allow the users to login inside the app without redirecting to mobile Safari.

Why only my app got this error, when dozens of apps using Facebook iOS SDK this way and don't get rejects?

Is there way in Facebook iOS SDK to open login page inside app?

like image 399
Vitaly Baev Avatar asked Jan 13 '15 08:01

Vitaly Baev


3 Answers

Facebook SDK 4.0+

FBSDKLoginManager *login = [FBSDKLoginManager new];
if (![UIApplication.sharedApplication canOpenURL:[NSURL URLWithString:@"fb://"]])
{
  login.loginBehavior = FBSDKLoginBehaviorWeb;
}

It will prevent to open through Safari.

like image 177
Victor Avatar answered Sep 28 '22 04:09

Victor


The same issue happens with the Google+ SDK, the app could be rejected for the same reason:

Reasons

10.6: Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are worth it. Apple sets a high bar. If your user interface is complex or less than very good, it may be rejected ----- 10.6 -----

We found the following issue with the user interface of your app:

The app opens a web page in mobile Safari for creating an account or logging in for Google+ account, then returns the user to the app. The user should be able to create an account or log in without opening Safari first.

So the best solution is to move the server-side oAuth 2.0 through the Embedded WebView where the SDK does not let you to handle this automatically (like the Facebook SDK), at least until those SDKs does not make an update to handle the Embedded WebView use case.

like image 44
loretoparisi Avatar answered Sep 28 '22 04:09

loretoparisi


Now Apple made their rules stricter.

You can find answer for your question in official Facebook documentation here.

Chapter "Embedded WebView Login Dialog"

like image 25
perpetuous Avatar answered Sep 28 '22 03:09

perpetuous