diff --git a/CHANGELOG.md b/CHANGELOG.md index 28b0302c7..59b51f3cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ [Full Changelog](https://github.com/mozilla/application-services/compare/v0.16.0...master) +## Logins + +### What's Fixed + +- iOS `LoginRecord`s will no longer use empty strings for `httpRealm` and `formSubmitUrl` in cases where they claim to use nil. ([#623](https://github.com/mozilla/application-services/issues/623)) + - More broadly, all optional strings in LoginRecords were were being represented as empty strings (instead of nil) unintentionally. This is fixed. +- iOS: Errors that were being accidentally swallowed should now be properly reported. ([#640](https://github.com/mozilla/application-services/issues/640)) + +### Breaking changes + +- iOS: Code that expects empty strings (and not nil) for optional strings should be updated to check for nil instead. ([#623](https://github.com/mozilla/application-services/issues/623)) # 0.16.0 (_2019-02-06_) diff --git a/components/logins/ios/Logins/LoginRecord.swift b/components/logins/ios/Logins/LoginRecord.swift index 59f9f1458..66396cebe 100644 --- a/components/logins/ios/Logins/LoginRecord.swift +++ b/components/logins/ios/Logins/LoginRecord.swift @@ -121,18 +121,18 @@ open class LoginRecord { password: dict["password"] as? String ?? "", hostname: dict["hostname"] as? String ?? "", - username: dict["username"] as? String ?? "", + username: dict["username"] as? String, - formSubmitURL: dict["formSubmitURL"] as? String ?? "", - httpRealm: dict["httpRealm"] as? String ?? "", + formSubmitURL: dict["formSubmitURL"] as? String, + httpRealm: dict["httpRealm"] as? String, timesUsed: (dict["timesUsed"] as? Int) ?? 0, timeLastUsed: (dict["timeLastUsed"] as? Int64) ?? 0, timeCreated: (dict["timeCreated"] as? Int64) ?? 0, timePasswordChanged: (dict["timePasswordChanged"] as? Int64) ?? 0, - usernameField: dict["usernameField"] as? String ?? "", - passwordField: dict["passwordField"] as? String ?? "" + usernameField: dict["usernameField"] as? String, + passwordField: dict["passwordField"] as? String ) }