[Don't Merge] Swiftify AuthInfo - #3904
Conversation
bbirman
left a comment
There was a problem hiding this comment.
nice candidate for modernizing
| import Foundation | ||
|
|
||
| @objc(SFOAuthType) | ||
| public enum AuthType: Int { |
There was a problem hiding this comment.
This looks like a breaking change because a case in Swift would currently be AuthInfo.AuthType.IDP vs AuthType.IDP, but maybe we could do it in 14.0 as in-place change instead of having a deprecation path since it's more of a straight forward rename?
There was a problem hiding this comment.
Yeah, that’s why we have the static constants below, from line 55 to 63. In Objective-C, they can still call SFOAuthTypeIDP. But yeah, not a 13.x change for sure.
|
|
||
| // Objective-C class factory method | ||
| @objc(infoWithAuthType:) | ||
| public class func info(withAuthType authType: AuthType) -> AuthInfo { |
There was a problem hiding this comment.
What's the use case for this vs init at line 77? I got confused by the comments because I thought one was for Objective-C and one was for Swift but they look like they're both available for both languages
There was a problem hiding this comment.
your right. I think I tried to put this up before the weekend and missed a couple things. I'll clean this up again.
Converted AuthInfo from Objc to Swift. Thoughts?