Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support user defined LoginViewController in swift3 #14

Closed

Conversation

hmuronaka
Copy link
Contributor

Hi, I wanted to use CustomizedLoginVIewController instead of original LoginViewController.
SwiftlySalesforce3.0 also supported "user defined loginviewController" previously supported by 2.2.0

@mike4aday mike4aday self-assigned this Nov 15, 2016
@mike4aday
Copy link
Owner

mike4aday commented Nov 16, 2016

Thanks @hmuronaka -- I made 2 minor modifications (below) to your code and included it in just-released version 3.1.0.

Modifications:

  1. Instead of a new protocol LoginViewControllable I adapted the existing 'LoginViewController' so it's now a protocol, and a new fileprivate class SafariLoginViewController implements it.
  2. Instead of a new method createLoginViewController, I let custom LoginDelegates implement their own version of login(url: URL) that doesn't assume a view controller is involved (e.g. in case of a different OAuth flow that might use stored credentials and no login form).

@mike4aday mike4aday closed this Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants