Apple rejected app 10.6 because Facebook opens Safari to login

空扰寡人 提交于 2019-11-28 11:38:27

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.

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.

Now Apple made their rules stricter.

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

Chapter "Embedded WebView Login Dialog"

The Facebook SDK for iOS provides various login experiences that your app can use to authenticate someone. This link includes all the information you need to know in order to implement Facebook login in your iOS app.Or Check ray wenderlich tutorial Facebook Tutorial for iOS: How To Use Facebook’s New Graph API from your iPhone App

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!