Wednesday, October 28, 2026
HomeiOS Developmentswift - AWS Datastore not Syncing IOS

swift – AWS Datastore not Syncing IOS

[ad_1]

My Datastore isn’t syncing with my cloud occasion and I dont know why! I’m new to AWS however simply adopted the tutorial right here:
https://docs.amplify.aws/begin/getting-started/combine/q/integration/ios/#query-todos

I bought so far as organising my native datastore and including/deleting/updating simply fantastic. I do know as a result of I used to be capable of print to my console the outcomes of the saved objects.

When it got here to cloud syncing it was not as straightforward.

I’ve setup a subscription and it returns nothing. Moreover after I use the graphQL console on-line I additionally don’t see any knowledge making me consider that the information isn’t synced in any respect.

I tried to manually replace the datasource and publish the information with the command discovered right here:
https://docs.amplify.aws/lib/datastore/sync/q/platform/ios/#advanced-use-case—query-instead-of-scan

let sink = Amplify.DataStore.save(publish, the place: Submit.keys.title.beginsWith("[Amplify]"))
.sink {
    if case let .failure(error) = $0 {
        print("Couldn't replace publish, perhaps the title has been modified?")
    }
}
receiveValue: { _ in
    print("Submit up to date efficiently!")
}

However i get the error publish isn't obtainable in scope regardless of the place I attempt to combine it.

Potential causes for this: initially I used to be utilizing congnito person pool however was getting errors so I switched to API key as an alternative I used to be capable of push efficiently no downside. when

Now after I test amplify standing I get no change for each my api and auth.

Any assist could be significantly appreciated, thanks upfront!

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments