ibm-bluemix-mobile-services/bms-clientsdk-swift-security-facebookauthentication

JSON represented as [String: AnyObject] in Swift 3

Closed this issue · 1 comments

This issue is really for BMSSecurity, but I could not find an issue tracker on that repository. There are methods that accept [String: AnyObject] as the parameter type. This works for Swift 2, but in Swift 3, it is more appropriate (and safer) to represent JSON as [String: Any] to avoid potentially erroneous casting to AnyObject from non-class types like String and Error. I noticed this in the submitAuthenticationFailure and submitAuthenticationChallengeAnswer, onAuthenticationSuccess, and onAuthenticationFailure methods (defined in BMSSecurity).