Google Plus login Apple now rejecting flip to Safari - ios

I have an app on the App Store (search for MTHS) that uses Google+ login.
The login feature was accepted in Aug 2014.
I submitted a bug fix in Dec 2014, and Apple rejected it for "flipping over to Safari to login":
We found the following issues with the user interface of your app:
The app opens a web page in mobile Safari for creating an account or logging in, then returns the user to the app. The user should be able to create an account or log in without opening Safari first.
Is there a way to implement Google+ login and not have the flip to Safari?
I have seen it in other apps.

The Google has released the latest Sign In SDK which resolves this problem.
Google Sign In SDK 2.0 is documented on the new dev site :
https://developers.google.com/identity/sign-in/ios/
Hope this helps..

Your app should be accepted if you notify the user first that the action will take them out of the app. A simple UIAlertView with a cancel and ok that continues with the Google+ login should work. An app we have does something similar and it was accepted after adding an alert.
Edit: Apple will reject any app that shifts to another app (e.g. launching another app like safari) without first notifying the user and giving them a choice with a label such as "This action will take you out of the app, continue?". In regards to this question, #Learner has the correct solution. At time of original answer, the new SDK wasn't yet available.

Related

iOS App Store rejection due to WeChat login requiring app installation; possible to use Web view to log in to WeChat on mobile?

An app that I recently submitted to the Apple App Store was rejected, due to the following reason: If the WeChat app is not installed and the user clicks a button "Login with WeChat", a dialog pops up telling the user they must install the WeChat app to log in with it. (if the app is installed, the user is bumped over to the WeChat app to finish login)
Apple suggested that we instead use a Web View to log the user in via WeChat, however the WeChat guide for mobile login states that mobile apps must log in through the WeChat app:
http://open.wechat.com/cgi-bin/newreadtemplate?t=overseas_open/docs/mobile/login/guide
I'm a little confused here because a previous app I had submitted was approved using this setup. In the app I'm currently trying to submit, the user is able to skip WeChat login if they wish, so WeChat installation is not required to use the app. However, it would be nice to be able to tell the user that WeChat is a login option, and that they need to install the WeChat app if they'd like to use it as a login option.
Does anyone know if it's allowable and/or possible (wrt WeChat's system) for an iOS app to log a user in via WeChat using a Web View? It seems that telling the user that WeChat is an available login option might not be possible otherwise...
To answer your question, We don't have any other Webview options to login with Wechat. (as of dated Jan 2018)
I had the same rejection from Apple some time back. After a lot of front and back questions and answers with Apple team, We finally hide the button to login with Wechat when Wechat App is not installed and the review passed. Most of the Chinese apps following the same method AFAIK.
Wechat iOS framework does provide an option to check app installed or not.
+ (BOOL)isWechatAppInstalled;
From the following code, you can check whether the Wechat app is installed in yours phone or not
if WXApi.isWXAppInstalled() {
print("Wechat app is installed")
} else {
print("Wechat app is not installed")
}

iOS 11 Facebook SignIn is showing an initial system alert

Preparing an app for iOS 11, I noticed there is a system alert showing up every time the user click on the "Facebook login" button. Does somebody know how to prevent this alert from appearing?. Now Social Networks integrations have been removed from the system and together with the Safari View Controller cookies storage changes (to not be shared) it sounds Apple has also added this extra alert to the sign up - sign in flow whenever you try to connect with Facebook. Has some body experienced the same issue in your apps?. Thanks for your comments.
It's not an issue. It's by design. Part of the authorization workflow when working with SFAuthenticationSession in iOS 11+ and you can't avoid it since it's a user permission request.
If an application uses SFAuthenticationSession, users are prompted by a dialog to give explicit consent, allowing the application to access the website's data in Safari.
SFAuthenticationSession docs

How to do facebook login without opening a browser at all?

The IOS app I'm currently working on uses FBSDKLoginManager().logInWithReadPermissions, which opens a browser in the app for user to login to facebook. Then, the browser closes, and the app uses the FBSDKLoginManagerLoginResult to proceed.
However, I want to change it so that the app uses preset settings to log into facebook in the background, without actually opening a browser at all. To put it in a simpler way, the app should not open the browser, but still cause a regular log-in. Is that possible?
Just to clarify, this feature is only intended when the app is running in the developer mode, not for the users.
Thank you!
EDIT: I also found FBSDKLoginBehaviorSystemAccount, which
Attempts log in through the Facebook account currently signed in through
the device Settings.
However, I have no idea about how to implement this in swift, and I cannot find any resource online besides the brief description in FacebookSDK's documentation. It will be great if someone can help!

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?
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.
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.
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

How to tell an iphone app user what will happen before opening Facebook login dialogue

Apps that allow users to log in over a 3rd party authentication provider (e.g. Facebook, Google, Twoitter,...) should open a browser window to let the user authenticate against the provider. That means, at some point, an app is backgrounded and the user interacts with a browser window. Just before the browser opens, it's a recommended pratctice to inform the user about what will happen (see e.g. Getting Started with OAuth 2.0 - O'Reilly), let's say an alert window with something like "you will leave now the XYZ app and a browser window will open where you can enter your credentials safely".
My question: How can that be done if I use the facebook SDK for ios? Looking at the SDK, there seem to be no notifications and no designated states that would allow me to detect that the sdk is about to background my app and about to opening either Safari or the Facebook app.
Use a simple alert that explains what will happen when pressing the button (or however you choose to do it). And when the user has pressed the OK on the alert sign them in.
However I'm quite certain that in Facebook terms of service you have to have some sort of Facebook trademark before interacting with facebook and it seems like standard practice to mention facebook in some way on a button and then log-in the user without mentioning it, since it plays on the user expectation.
Especially when using iOS 6.0 and Facebook SDK 3.1 for iOS, then Facebooks SDK takes care of most of that in it's own.

Resources