Open swaroop-at-dockare opened 1 year ago
Apologies for the delayed response. Our team will look into the issue and provide an update.
@swaroop-at-dockare Sorry for the delay on our side. Is this still an issue that you are facing? If yes, would you be able to share the schemas being used? Also would you be able to give some code examples of how you are creating groups when online and offline?
Also if you can create a diagnostic report and share the identifier, I can try to recreate this issue locally in my environment.
amplify diagnose --send-report
Thank you for your patience.
Issue Description:
I am implementing a chat application. I am using AWSCognitoAuthPlugin for authentication in conjunction with dynamic group permission policy. I am creating a chat group and binding them with Cognito users to them dynamically from my backend. Which works fine when the user is online. Our application has offline capabilities. So the user can create a chat group offline and start sending the message. Amplify stores the data offline. But when the application starts to sync the data before the group is added to the AWS Cognito pool, it fails the sync for those particular messages as the user is not added to that group yet. But once the user is added to the group, the application starts working fine for the next messages. But the messages which are failed to sync are stored only on the local device. They are not synced again if all the next messages are synced. Is there any way I can re-sync these failed items or prevent the sync until the group creation process?
Amplify Framework Version 2.15.2
Amplify Categories Auth, Datastore
Dependency Manager Swift Package Manager
Swift Version 5.8.1
Platform iOS