Description
What problem are you facing?
we are currently using the Braze Swift SDK in our application and have encountered issues with the addAlias function. Specifically, we have observed instances where the alias is not being registered, but there is no callback or error handling mechanism to inform me of this failure. This lack of feedback makes it challenging to diagnose and address the issue effectively.
While using the addAlias function, there are occasions where the alias addition fails silently. Without a callback or error reporting mechanism, it's difficult to determine whether the alias was successfully added or why it failed. This hinders our ability to ensure reliable user identity management within our application.
Workarounds
no clean solution at the moment
Ideal Solution
The addAlias
function in the Braze Swift SDK be updated to include a callback that provides feedback on the status of the alias addition. This callback should offer:
-
A success indicator (e.g., a Boolean value).
-
In case of failure, a reason for the error (e.g., network issues, invalid alias, etc.).
Use Case:
This feature is essential for scenarios where it is crucial to know if an alias has been successfully added. For example, in applications where user identity management is critical, knowing the outcome of the alias addition allows developers to take appropriate actions based on the result.
Proposed Implementation:
An example of how this might look :
Braze.sharedInstance()?.user.add(alias: "alias", label: "label") { success, error in
if success {
print("Alias added successfully")
} else {
if let error = error {
print("Failed to add alias: \(error.localizedDescription)")
} else {
print("Failed to add alias for an unknown reason")
}
}
}
Other Information
No response