Profile cover photo
Profile photo
Arthur Lockrem

iOS native app:: When I refresh remote data using SFSyncStateMergeModeOverwrite sync options the records previously downloaded, that have been deleted in Salesforce, are not removed from my local data. What do I need to do to sync the local data with Salesforce, including deleting invalid records?

I am using the forcedotcom files for native offline support on iOS.  I have made a few changes locally that probably aren’t very beneficial to others.  One of the changes may help others.  I would like your feedback and recommendation of next steps.

The records I would like to sync locally have different where clauses and limits based on the object.

- I have created an abstract method on the SObjectDataSpec class to get the soql statement.
- I moved the kSyncLimit variable to the object-based SObjectDataSpec classes.
- I updated the refreshRemoteData method on the SObjectDataManager class to get the soql from the dataSpec.

Please let me know if I am missing something and there is an easier way to implement this based on the current code available on GitHub.  If you agree that this is a benefit to the project please help me understand what I should do to apply these updates to the public repository.

Any help is appreciated.
Wait while more posts are being loaded