Environment:
Platform: iOS
Using AWS Amplify Gen1 with DataStore on Swift v2
Authentication: Cognito with group-based permissions
Issue Description:
I'm working on porting an existing and fully working Android app to iOS. Most models sync correctly (Articles, Projects, Devices, etc.), but with a model called Orders have a specific issue:
I create Orders using the same User / Credentials on iOS and Android.
Orders I create on my iOS device sync properly to DynamoDB and are visible on Android devices and iOS devices.
However, Orders created via Android (visible in DynamoDB and on Android devices) don't appear on my iOS app.
Debugging Information:
Auth Rules for Order Model
model.authRules = [
rule(allow: .groups, groupClaim: "cognito", groupsField: "groups", operations: [.create, .update, .delete, .read])
]
Auth Status
User is properly authenticated
Cognito groups for User are identical on both devices
Data Sync
DataStore sync events are being received properly
Explicit, unfiltered queries for Order return only my Orders (2 out of 3 that exist in DynamoDB)
Complete reset of DataStore with clear() doesn't resolve the issue
Order Model Relationships
Order has required relationships with: Device, Project, Article
Query Output
When performing an unfiltered query for Orders: Found 2 Orders
Attempted Solutions:
Reset and cleared DataStore completely
Implemented various subscription/observation approaches
Removed all filtering from queries
Verified credentials and group membership
Questions:
Why would group-based filtering work differently on iOS vs Android?
Could there be a special handling of the "groups" field in iOS Amplify that differs from Android?
Is there a way to bypass or modify the group-based filtering for testing purposes?
Are there known issues with DataStore sync when using group-based permissions?
Any help or guidance would be greatly appreciated!