The retrieve query above was incorrect. Here are the correct queries.
Add -
[kSecClass: kSecClassGenericPassword,
kSecAttrService: type.rawValue,
kSecAttrAccount: identifier,
kSecValueData: dataFromString]
Update -
[kSecClass: kSecClassGenericPassword,
kSecAttrService: type.rawValue,
kSecAttrAccount: identifier]
Remove -
[kSecClass: kSecClassGenericPassword,
kSecAttrService: type.rawValue,
kSecAttrAccount: identifier]
Retrieve -
[kSecClass: kSecClassGenericPassword,
kSecAttrService: type.rawValue,
kSecAttrAccount: identifier,
kSecReturnData: true,
kSecMatchLimit: kSecMatchLimitOne]