I'm working on a React Native app using Mobile SDK 6.2, but I believe my question would apply equally to a Native iOS app. I started the app from the "basic react native mobile" template. I've enabled "Advanced Authentication" following the instructions in the documentation.
This works, but before the app shows the login page, it shows a popup message, "To log you into [login server url], Safari will open briefly. You'll switch back to [AppName] after authentication". The popup has two options, OK and Cancel. OK proceeds to the login page, and Cancel shows the Login Server selection panel available from the setup icon. However, I've disabled the setup icon, and I don't want this popup... I want the login screen displayed directly.
I have found that
SFSDKOAuthClient.m in the Mobile SDK implements [
SFOAuthCoordinatorDelegate oauthCoordinator:willBeginAuthenticationWithView:], displaying the popup. I'd like to override this implementation with my own version that just calls the
YES instead of displaying any popup, but I can't figure out what is the correct way to do this. How do I provide my own
SFOAuthCoordinatorDelegate without re-implementing all of the SDK-provided code (
SFSDKOAuthClient, and whatever invokes it)? As I mentioned above, I'm building a React Native app, so my Native iOS knowledge is limited, but it appears some native code is needed to make this change.