amplify-swift: changes in real time is broken in v1.13
Describe the bug
once I update to v1.13, and even though the subscription is established, any changes in the backend or from any other device will not be synced to the other device.
Steps To Reproduce
Steps to repro:-
upgrade to V1.13
using 2 devices, with the same database ,userID, auth ..etc
create, delete. update any record the changes will not be reflected.
How to solve:-
downgrade to v1.12
Devices:-
physical device or simulator --> same behavior.
Expected behavior
all changes should be synced.
Amplify Framework Version
1.13
Amplify Categories
DataStore
Dependency manager
Swift PM
Swift version
14.6, 14.5, 14.4
CLI version
5.1.0
Xcode version
12.5.1
Relevant log output
No response
Is this a regression? (i.e. was this working before a version upgrade)
No response
Device
Iphone XS max (physical), iPhone 11 pros max simulator and other simulators.
iOS Version
14.6 14.5 14.4
Specific to simulators
No response
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 31 (11 by maintainers)
@diegocstn ,
I spent some time looking into this further. From what I can tell, the trouble is in
StorageEngine.startSync.requiresAuthPlugin()comes back false and therefore leads to the sync engine to start without auth. That it turn leads to the problems, I mentioned above.Next I checked why it comes back false and found that in
AuthRule.requiresAuthPluginproviderisnil, which is being mapped to false. I stopped investigating there, but there seems to be some sort of logic error here, no race. Either way, I adapted the mapping and everything is working fine now.@diegocstn This appears to have fixed our sync issues as well. Thank you!