-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDKS-3533 Prevent duplicated notification on iOS SDK #314
Conversation
FRALog.v("PushNotification object is created and saved into StorageClient") | ||
} | ||
else { | ||
FRALog.w("PushNotification object failed to be stored into StorageClient") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not treat that as an error and return nil? If we end up on this situation, is the Push actionable or would the app be stuck?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a valid reason that the notification will fail the storage step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! we should return nil here. It's unlikely we will have an exception while persisting it because the default storage is the Keychain. However, if a developer decide to use SQLite or any other storage, it may happen, so we need to confirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me
JIRA Ticket
SDKS-3533 [iOS][Authenticator] Prevent duplicated notification on iOS SDK
Description
The iOS SDK does not verify whether a push notification with an identical identifier has already been stored, delegating this responsibility to the application developer. This PR include the following changes:
getNotificationByMessageId
method to theStorageClient
andFRAClient
FRAPushHandler
class to check whether a payload was already persistedDefinition of Done Checklist: